home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-01-05 | 292.0 KB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Dec 22 11:20:02 1992, modified Tue Jan 5 10:00:21 1993, creator 'HLX2', type 'ONLN', 290295 bytes "TN-Memory" , at 0x46e77 8472 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
100%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 54 4e 2d 4d 65 6d | 6f 72 79 00 00 00 00 00 |..TN-Mem|ory.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 04 6d f7 00 | 00 21 18 a7 5c f0 b2 a7 |.....m..|.!..\...|
|00000060| 6f 53 05 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |oS......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 cd b6 00 00 |........|........|
|00000080| 55 73 69 6e 67 20 4d 61 | 78 41 70 70 6c 5a 6f 6e |Using Ma|xApplZon|
|00000090| 65 20 61 6e 64 20 4d 6f | 76 65 48 48 69 20 66 72 |e and Mo|veHHi fr|
|000000a0| 6f 6d 20 41 73 73 65 6d | 62 6c 79 20 4c 61 6e 67 |om Assem|bly Lang|
|000000b0| 75 61 67 65 0d 4d 65 6d | 6f 72 79 09 4d 2e 4d 45 |uage.Mem|ory.M.ME|
|000000c0| 2e 4d 61 78 41 70 70 6c | 5a 6f 6e 65 26 4d 6f 76 |.MaxAppl|Zone&Mov|
|000000d0| 65 48 48 69 41 53 4d 0d | 52 65 76 69 73 65 64 20 |eHHiASM.|Revised |
|000000e0| 62 79 3a 09 09 4d 61 72 | 63 68 20 31 39 38 38 0d |by:..Mar|ch 1988.|
|000000f0| 57 72 69 74 74 65 6e 20 | 62 79 3a 09 42 72 79 61 |Written |by:.Brya|
|00000100| 6e 20 22 42 6f 62 22 20 | 4a 6f 68 6e 73 6f 6e 09 |n "Bob" |Johnson.|
|00000110| 4a 61 6e 75 61 72 79 20 | 31 39 38 37 0d 57 68 65 |January |1987.Whe|
|00000120| 6e 20 63 61 6c 6c 69 6e | 67 20 4d 61 78 41 70 70 |n callin|g MaxApp|
|00000130| 6c 5a 6f 6e 65 20 61 6e | 64 20 4d 6f 76 65 48 48 |lZone an|d MoveHH|
|00000140| 69 20 66 72 6f 6d 20 61 | 73 73 65 6d 62 6c 79 20 |i from a|ssembly |
|00000150| 6c 61 6e 67 75 61 67 65 | 2c 20 62 65 20 73 75 72 |language|, be sur|
|00000160| 65 20 74 6f 20 67 65 74 | 20 74 68 65 20 63 6f 72 |e to get| the cor|
|00000170| 72 65 63 74 20 63 6f 64 | 65 2e 20 0d 4d 61 78 41 |rect cod|e. .MaxA|
|00000180| 70 70 6c 5a 6f 6e 65 20 | 61 6e 64 20 4d 6f 76 65 |pplZone |and Move|
|00000190| 48 48 69 20 77 65 72 65 | 20 6d 61 72 6b 65 64 20 |HHi were| marked |
|000001a0| 5b 4e 6f 74 20 69 6e 20 | 52 4f 4d 5d 20 69 6e 20 |[Not in |ROM] in |
|000001b0| 49 6e 73 69 64 65 20 4d | 61 63 69 6e 74 6f 73 68 |Inside M|acintosh|
|000001c0| 2c 20 56 6f 6c 75 6d 65 | 73 20 49 2d 49 49 49 20 |, Volume|s I-III |
|000001d0| 2e 20 54 68 65 79 20 61 | 72 65 20 52 4f 4d 20 63 |. They a|re ROM c|
|000001e0| 61 6c 6c 73 20 69 6e 20 | 74 68 65 20 31 32 38 4b |alls in |the 128K|
|000001f0| 20 52 4f 4d 2e 20 53 69 | 6e 63 65 20 74 68 65 79 | ROM. Si|nce they|
|00000200| 20 61 72 65 20 6e 6f 74 | 20 69 6e 20 74 68 65 20 | are not| in the |
|00000210| 36 34 4b 20 52 4f 4d 2c | 20 69 66 20 79 6f 75 20 |64K ROM,| if you |
|00000220| 77 61 6e 74 20 79 6f 75 | 72 20 70 72 6f 67 72 61 |want you|r progra|
|00000230| 6d 20 74 6f 20 77 6f 72 | 6b 20 6f 6e 20 36 34 4b |m to wor|k on 64K|
|00000240| 20 52 4f 4d 20 72 6f 75 | 74 69 6e 65 73 20 69 74 | ROM rou|tines it|
|00000250| 20 69 73 20 6e 65 63 65 | 73 73 61 72 79 20 74 6f | is nece|ssary to|
|00000260| 20 63 61 6c 6c 20 74 68 | 65 20 72 6f 75 74 69 6e | call th|e routin|
|00000270| 65 73 20 62 79 20 61 20 | 4a 53 52 20 74 6f 20 61 |es by a |JSR to a|
|00000280| 20 67 6c 75 65 20 28 6c | 69 62 72 61 72 79 29 20 | glue (l|ibrary) |
|00000290| 72 6f 75 74 69 6e 65 20 | 69 6e 73 74 65 61 64 20 |routine |instead |
|000002a0| 6f 66 20 75 73 69 6e 67 | 20 74 68 65 20 61 63 74 |of using| the act|
|000002b0| 75 61 6c 20 74 72 61 70 | 20 6d 61 63 72 6f 2e 20 |ual trap| macro. |
|000002c0| 54 68 65 20 67 6c 75 65 | 20 63 61 6c 6c 73 20 74 |The glue| calls t|
|000002d0| 68 65 20 52 4f 4d 20 72 | 6f 75 74 69 6e 65 73 20 |he ROM r|outines |
|000002e0| 69 66 20 74 68 65 79 20 | 61 72 65 20 61 76 61 69 |if they |are avai|
|000002f0| 6c 61 62 6c 65 2c 20 6f | 72 20 65 78 65 63 75 74 |lable, o|r execut|
|00000300| 65 73 20 69 74 73 20 63 | 6f 70 79 20 6f 66 20 74 |es its c|opy of t|
|00000310| 68 65 6d 20 28 6c 69 6e | 6b 65 64 20 69 6e 74 6f |hem (lin|ked into|
|00000320| 20 79 6f 75 72 20 70 72 | 6f 67 72 61 6d 29 20 69 | your pr|ogram) i|
|00000330| 66 20 6e 6f 74 2e 0d 48 | 6f 77 20 74 6f 20 64 6f |f not..H|ow to do|
|00000340| 20 69 74 3a 0d 57 68 65 | 6e 65 76 65 72 20 79 6f | it:.Whe|never yo|
|00000350| 75 20 6e 65 65 64 20 74 | 6f 20 75 73 65 20 74 68 |u need t|o use th|
|00000360| 65 73 65 20 63 61 6c 6c | 73 2c 20 6a 75 73 74 20 |ese call|s, just |
|00000370| 63 61 6c 6c 20 74 68 65 | 20 6c 69 62 72 61 72 79 |call the| library|
|00000380| 20 72 6f 75 74 69 6e 65 | 2e 20 49 74 20 77 69 6c | routine|. It wil|
|00000390| 6c 20 63 68 65 63 6b 20 | 52 4f 4d 38 35 20 74 6f |l check |ROM85 to|
|000003a0| 20 64 65 74 65 72 6d 69 | 6e 65 20 77 68 69 63 68 | determi|ne which|
|000003b0| 20 52 4f 4d 73 20 61 72 | 65 20 72 75 6e 6e 69 6e | ROMs ar|e runnin|
|000003c0| 67 2c 20 61 6e 64 20 64 | 6f 20 74 68 65 20 61 70 |g, and d|o the ap|
|000003d0| 70 72 6f 70 72 69 61 74 | 65 20 74 68 69 6e 67 2e |propriat|e thing.|
|000003e0| 0d 46 6f 72 20 4d 44 53 | 2c 20 69 6e 63 6c 75 64 |.For MDS|, includ|
|000003f0| 65 20 74 68 65 20 4d 65 | 6d 6f 72 79 2e 52 65 6c |e the Me|mory.Rel|
|00000400| 20 6c 69 62 72 61 72 79 | 20 69 6e 20 79 6f 75 72 | library| in your|
|00000410| 20 6c 69 6e 6b 20 66 69 | 6c 65 20 61 6e 64 20 75 | link fi|le and u|
|00000420| 73 65 3a 20 0d 09 58 52 | 45 46 20 20 4d 6f 76 65 |se: ..XR|EF Move|
|00000430| 48 48 69 20 20 20 20 3b | 20 77 65 20 6e 65 65 64 |HHi ;| we need|
|00000440| 20 74 6f 20 75 73 65 20 | 74 68 69 73 20 27 52 4f | to use |this 'RO|
|00000450| 4d 27 20 72 6f 75 74 69 | 6e 65 0d 09 2e 2e 2e 0d |M' routi|ne......|
|00000460| 09 4a 53 52 20 20 4d 6f | 76 65 48 48 69 20 20 20 |.JSR Mo|veHHi |
|00000470| 20 20 3b 20 6a 75 6d 70 | 20 74 6f 20 74 68 65 20 | ; jump| to the |
|00000480| 67 6c 75 65 20 72 6f 75 | 74 69 6e 65 20 74 68 61 |glue rou|tine tha|
|00000490| 74 20 77 69 6c 6c 20 63 | 68 65 63 6b 20 52 4f 4d |t will c|heck ROM|
|000004a0| 38 35 20 66 6f 72 20 75 | 73 0d 46 6f 72 20 4d 50 |85 for u|s.For MP|
|000004b0| 57 20 6c 69 6e 6b 20 77 | 69 74 68 20 49 6e 74 65 |W link w|ith Inte|
|000004c0| 72 66 61 63 65 2e 6f 20 | 61 6e 64 20 75 73 65 3a |rface.o |and use:|
|000004d0| 0d 09 49 4d 50 4f 52 54 | 20 20 4d 6f 76 65 48 48 |..IMPORT| MoveHH|
|000004e0| 69 20 20 20 3b 20 77 65 | 20 6e 65 65 64 20 74 6f |i ; we| need to|
|000004f0| 20 75 73 65 20 74 68 69 | 73 0d 09 2e 2e 2e 0d 09 | use thi|s.......|
|00000500| 4a 53 52 20 20 4d 6f 76 | 65 48 48 69 20 20 20 20 |JSR Mov|eHHi |
|00000510| 20 20 3b 20 6a 75 6d 70 | 20 74 6f 20 74 68 65 20 | ; jump| to the |
|00000520| 67 6c 75 65 20 72 6f 75 | 74 69 6e 65 20 74 68 61 |glue rou|tine tha|
|00000530| 74 20 77 69 6c 6c 20 63 | 68 65 63 6b 20 52 4f 4d |t will c|heck ROM|
|00000540| 38 35 20 66 6f 72 20 75 | 73 0d 41 76 6f 69 64 20 |85 for u|s.Avoid |
|00000550| 63 61 6c 6c 69 6e 67 20 | 5f 4d 61 78 41 70 70 6c |calling |_MaxAppl|
|00000560| 5a 6f 6e 65 20 6f 72 20 | 5f 4d 6f 76 65 48 48 69 |Zone or |_MoveHHi|
|00000570| 20 64 69 72 65 63 74 6c | 79 20 69 66 20 79 6f 75 | directl|y if you|
|00000580| 20 77 61 6e 74 20 79 6f | 75 72 20 73 6f 66 74 77 | want yo|ur softw|
|00000590| 61 72 65 20 74 6f 20 77 | 6f 72 6b 20 6f 6e 20 74 |are to w|ork on t|
|000005a0| 68 65 20 36 34 4b 20 52 | 4f 4d 73 2c 20 73 69 6e |he 64K R|OMs, sin|
|000005b0| 63 65 20 74 68 61 74 20 | 77 69 6c 6c 20 61 73 73 |ce that |will ass|
|000005c0| 65 6d 62 6c 65 20 74 6f | 20 61 6e 20 61 63 74 75 |emble to| an actu|
|000005d0| 61 6c 20 74 72 61 70 2c | 20 6e 6f 74 20 74 6f 20 |al trap,| not to |
|000005e0| 61 20 4a 53 52 20 74 6f | 20 74 68 65 20 6c 69 62 |a JSR to| the lib|
|000005f0| 72 61 72 79 2e 0d 49 66 | 20 79 6f 75 72 20 70 72 |rary..If| your pr|
|00000600| 6f 67 72 61 6d 20 69 73 | 20 67 6f 69 6e 67 20 74 |ogram is| going t|
|00000610| 6f 20 62 65 20 72 75 6e | 20 6f 6e 6c 79 20 6f 6e |o be run| only on|
|00000620| 20 6d 61 63 68 69 6e 65 | 73 20 77 69 74 68 20 74 | machine|s with t|
|00000630| 68 65 20 31 32 38 4b 20 | 52 4f 4d 20 6f 72 20 6e |he 128K |ROM or n|
|00000640| 65 77 65 72 2c 20 79 6f | 75 20 63 61 6e 20 63 61 |ewer, yo|u can ca|
|00000650| 6c 6c 20 74 68 65 20 74 | 72 61 70 73 20 64 69 72 |ll the t|raps dir|
|00000660| 65 63 74 6c 79 2e 20 42 | 65 20 73 75 72 65 20 74 |ectly. B|e sure t|
|00000670| 6f 20 63 68 65 63 6b 20 | 66 6f 72 20 74 68 65 20 |o check |for the |
|00000680| 36 34 4b 20 52 4f 4d 73 | 2c 20 61 6e 64 20 72 65 |64K ROMs|, and re|
|00000690| 70 6f 72 74 20 61 6e 20 | 65 72 72 6f 72 20 74 6f |port an |error to|
|000006a0| 20 74 68 65 20 75 73 65 | 72 2e 20 59 6f 75 20 63 | the use|r. You c|
|000006b0| 61 6e 20 63 68 65 63 6b | 20 66 6f 72 20 6f 6c 64 |an check| for old|
|000006c0| 20 52 4f 4d 73 20 75 73 | 69 6e 67 20 74 68 65 20 | ROMs us|ing the |
|000006d0| 53 79 73 45 6e 76 69 72 | 6f 6e 73 20 74 72 61 70 |SysEnvir|ons trap|
|000006e0| 20 61 73 20 64 65 73 63 | 72 69 62 65 64 20 69 6e | as desc|ribed in|
|000006f0| 20 54 65 63 68 6e 69 63 | 61 6c 20 4e 6f 74 65 20 | Technic|al Note |
|00000700| 23 31 32 39 2e 0d 46 75 | 72 74 68 65 72 20 52 65 |#129..Fu|rther Re|
|00000710| 66 65 72 65 6e 63 65 3a | 0d a5 09 55 73 69 6e 67 |ference:|...Using|
|00000720| 20 41 73 73 65 6d 62 6c | 79 20 4c 61 6e 67 75 61 | Assembl|y Langua|
|00000730| 67 65 0d a5 09 54 68 65 | 20 4d 65 6d 6f 72 79 20 |ge...The| Memory |
|00000740| 4d 61 6e 61 67 65 72 0d | a5 09 54 65 63 68 6e 69 |Manager.|..Techni|
|00000750| 63 61 6c 20 4e 6f 74 65 | 20 4d 2e 46 4c 2e 53 79 |cal Note| M.FL.Sy|
|00000760| 73 45 6e 76 69 72 6f 6e | 73 20 d1 0d 09 09 47 65 |sEnviron|s ....Ge|
|00000770| 73 74 61 6c 74 20 61 6e | 64 20 53 79 73 45 6e 76 |stalt an|d SysEnv|
|00000780| 69 72 6f 6e 73 3a 20 61 | 20 4e 65 76 65 72 20 45 |irons: a| Never E|
|00000790| 6e 64 69 6e 67 20 53 74 | 6f 72 79 0d 52 65 67 69 |nding St|ory.Regi|
|000007a0| 73 74 65 72 20 41 35 20 | 57 69 74 68 69 6e 20 47 |ster A5 |Within G|
|000007b0| 72 6f 77 5a 6f 6e 65 20 | 46 75 6e 63 74 69 6f 6e |rowZone |Function|
|000007c0| 73 0d 4d 65 6d 6f 72 79 | 09 4d 2e 4d 45 2e 47 72 |s.Memory|.M.ME.Gr|
|000007d0| 6f 77 5a 6f 6e 65 41 35 | 0d 52 65 76 69 73 65 64 |owZoneA5|.Revised|
|000007e0| 20 62 79 3a 09 09 4d 61 | 72 63 68 20 31 39 38 38 | by:..Ma|rch 1988|
|000007f0| 0d 57 72 69 74 74 65 6e | 20 62 79 3a 09 43 68 72 |.Written| by:.Chr|
|00000800| 69 73 20 44 65 72 6f 73 | 73 69 09 4a 75 6c 79 20 |is Deros|si.July |
|00000810| 31 39 38 37 0d 49 66 20 | 79 6f 75 20 68 61 76 65 |1987.If |you have|
|00000820| 20 61 20 67 72 6f 77 20 | 7a 6f 6e 65 20 66 75 6e | a grow |zone fun|
|00000830| 63 74 69 6f 6e 2c 20 69 | 74 20 6d 61 79 20 67 65 |ction, i|t may ge|
|00000840| 74 20 63 61 6c 6c 65 64 | 20 77 68 65 6e 20 61 20 |t called| when a |
|00000850| 73 79 73 74 65 6d 20 72 | 6f 75 74 69 6e 65 20 69 |system r|outine i|
|00000860| 73 20 74 72 79 69 6e 67 | 20 74 6f 20 61 6c 6c 6f |s trying| to allo|
|00000870| 63 61 74 65 20 6d 65 6d | 6f 72 79 2e 20 42 65 63 |cate mem|ory. Bec|
|00000880| 61 75 73 65 20 74 68 69 | 73 20 63 61 6e 20 68 61 |ause thi|s can ha|
|00000890| 70 70 65 6e 2c 20 79 6f | 75 20 63 61 6e d5 74 20 |ppen, yo|u can.t |
|000008a0| 62 65 20 67 75 61 72 61 | 6e 74 65 65 64 20 74 68 |be guara|nteed th|
|000008b0| 61 74 20 72 65 67 69 73 | 74 65 72 20 41 35 20 77 |at regis|ter A5 w|
|000008c0| 69 6c 6c 20 62 65 20 63 | 6f 72 72 65 63 74 2e 0d |ill be c|orrect..|
|000008d0| 49 66 20 79 6f 75 72 20 | 67 72 6f 77 20 7a 6f 6e |If your |grow zon|
|000008e0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 64 65 70 65 6e |e functi|on depen|
|000008f0| 64 73 20 6f 6e 20 41 35 | 2c 20 79 6f 75 20 73 68 |ds on A5|, you sh|
|00000900| 6f 75 6c 64 20 73 61 76 | 65 20 72 65 67 69 73 74 |ould sav|e regist|
|00000910| 65 72 20 41 35 2c 20 6c | 6f 61 64 20 41 35 20 66 |er A5, l|oad A5 f|
|00000920| 72 6f 6d 20 74 68 65 20 | 6c 6f 77 2d 6d 65 6d 6f |rom the |low-memo|
|00000930| 72 79 20 67 6c 6f 62 61 | 6c 20 43 75 72 72 65 6e |ry globa|l Curren|
|00000940| 74 41 35 20 28 61 20 6c | 6f 6e 67 20 77 6f 72 64 |tA5 (a l|ong word|
|00000950| 20 61 74 20 24 39 30 34 | 29 2c 20 61 6e 64 20 72 | at $904|), and r|
|00000960| 65 73 74 6f 72 65 20 74 | 68 65 20 63 61 6c 6c 65 |estore t|he calle|
|00000970| 72 d5 73 20 41 35 20 62 | 65 66 6f 72 65 20 79 6f |r.s A5 b|efore yo|
|00000980| 75 20 65 78 69 74 2e 0d | 46 72 6f 6d 20 68 69 67 |u exit..|From hig|
|00000990| 68 2d 6c 65 76 65 6c 20 | 6c 61 6e 67 75 61 67 65 |h-level |language|
|000009a0| 73 2c 20 79 6f 75 20 63 | 61 6e 20 61 6c 73 6f 20 |s, you c|an also |
|000009b0| 75 73 65 20 74 68 65 20 | 4f 70 65 72 61 74 69 6e |use the |Operatin|
|000009c0| 67 20 53 79 73 74 65 6d | 20 55 74 69 6c 69 74 79 |g System| Utility|
|000009d0| 20 63 61 6c 6c 73 20 53 | 65 74 55 70 41 35 20 61 | calls S|etUpA5 a|
|000009e0| 6e 64 20 52 65 73 74 6f | 72 65 41 35 20 28 70 61 |nd Resto|reA5 (pa|
|000009f0| 67 65 20 33 38 36 20 6f | 66 20 49 6e 73 69 64 65 |ge 386 o|f Inside|
|00000a00| 20 4d 61 63 69 6e 74 6f | 73 68 20 56 6f 6c 75 6d | Macinto|sh Volum|
|00000a10| 65 20 49 49 29 2e 20 53 | 65 74 55 70 41 35 20 73 |e II). S|etUpA5 s|
|00000a20| 74 6f 72 65 73 20 74 68 | 65 20 d4 6f 6c 64 d5 20 |tores th|e .old. |
|00000a30| 41 35 20 6f 6e 20 74 68 | 65 20 73 74 61 63 6b 20 |A5 on th|e stack |
|00000a40| 61 6e 64 20 70 75 74 73 | 20 74 68 65 20 76 61 6c |and puts| the val|
|00000a50| 75 65 20 73 74 6f 72 65 | 64 20 61 74 20 43 75 72 |ue store|d at Cur|
|00000a60| 72 65 6e 74 41 35 20 69 | 6e 74 6f 20 41 35 2e 20 |rentA5 i|nto A5. |
|00000a70| 4d 61 6b 65 20 73 75 72 | 65 20 74 6f 20 63 61 6c |Make sur|e to cal|
|00000a80| 6c 20 52 65 73 74 6f 72 | 65 41 35 20 77 68 65 6e |l Restor|eA5 when|
|00000a90| 20 79 6f 75 d5 72 65 20 | 64 6f 6e 65 20 73 6f 20 | you.re |done so |
|00000aa0| 74 68 61 74 20 69 74 20 | 63 61 6e 20 70 6f 70 20 |that it |can pop |
|00000ab0| 74 68 65 20 73 61 76 65 | 64 20 76 61 6c 75 65 20 |the save|d value |
|00000ac0| 6f 66 20 41 35 20 6f 66 | 66 20 74 68 65 20 73 74 |of A5 of|f the st|
|00000ad0| 61 63 6b 2e 0d 59 6f 75 | 72 20 67 72 6f 77 20 7a |ack..You|r grow z|
|00000ae0| 6f 6e 65 20 66 75 6e 63 | 74 69 6f 6e 20 64 65 70 |one func|tion dep|
|00000af0| 65 6e 64 73 20 6f 6e 20 | 41 35 20 69 66 20 69 74 |ends on |A5 if it|
|00000b00| 20 64 6f 65 73 20 61 6e | 79 20 6f 66 20 74 68 65 | does an|y of the|
|00000b10| 20 66 6f 6c 6c 6f 77 69 | 6e 67 3a 0d a5 09 41 63 | followi|ng:...Ac|
|00000b20| 63 65 73 73 65 73 20 79 | 6f 75 72 20 61 70 70 6c |cesses y|our appl|
|00000b30| 69 63 61 74 69 6f 6e d5 | 73 20 67 6c 6f 62 61 6c |ication.|s global|
|00000b40| 20 76 61 72 69 61 62 6c | 65 73 20 28 77 68 69 63 | variabl|es (whic|
|00000b50| 68 20 61 72 65 20 73 74 | 6f 72 65 64 20 61 74 20 |h are st|ored at |
|00000b60| 6e 65 67 61 74 69 76 65 | 20 6f 66 66 73 65 74 73 |negative| offsets|
|00000b70| 20 66 72 6f 6d 20 41 35 | 29 2e 0d a5 09 41 63 63 | from A5|)....Acc|
|00000b80| 65 73 73 65 73 20 74 68 | 65 20 51 75 69 63 6b 44 |esses th|e QuickD|
|00000b90| 72 61 77 20 67 6c 6f 62 | 61 6c 73 2e 20 28 41 35 |raw glob|als. (A5|
|00000ba0| 20 63 6f 6e 74 61 69 6e | 73 20 74 68 65 20 61 64 | contain|s the ad|
|00000bb0| 64 72 65 73 73 20 6f 66 | 20 61 20 70 6f 69 6e 74 |dress of| a point|
|00000bc0| 65 72 20 74 6f 20 74 68 | 65 20 51 75 69 63 6b 44 |er to th|e QuickD|
|00000bd0| 72 61 77 20 09 67 6c 6f | 62 61 6c 20 76 61 72 69 |raw .glo|bal vari|
|00000be0| 61 62 6c 65 73 2e 29 0d | a5 09 4d 61 6b 65 73 20 |ables.).|..Makes |
|00000bf0| 61 6e 79 20 52 4f 4d 20 | 74 72 61 70 20 63 61 6c |any ROM |trap cal|
|00000c00| 6c 73 2e 0d a5 09 4d 61 | 6b 65 73 20 61 6e 79 20 |ls....Ma|kes any |
|00000c10| 69 6e 74 65 72 73 65 67 | 6d 65 6e 74 20 63 61 6c |interseg|ment cal|
|00000c20| 6c 73 20 74 6f 20 72 6f | 75 74 69 6e 65 73 20 69 |ls to ro|utines i|
|00000c30| 6e 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |n your a|pplicati|
|00000c40| 6f 6e 2e 0d 54 6f 20 64 | 6f 20 61 6e 79 20 6f 66 |on..To d|o any of|
|00000c50| 20 74 68 65 73 65 2c 20 | 41 35 20 6e 65 65 64 73 | these, |A5 needs|
|00000c60| 20 74 6f 20 63 6f 6e 74 | 61 69 6e 20 74 68 65 20 | to cont|ain the |
|00000c70| 76 61 6c 75 65 20 66 72 | 6f 6d 20 43 75 72 72 65 |value fr|om Curre|
|00000c80| 6e 74 41 35 2e 20 50 6c | 65 61 73 65 20 6e 6f 74 |ntA5. Pl|ease not|
|00000c90| 65 20 74 68 61 74 20 74 | 68 69 73 20 69 73 20 64 |e that t|his is d|
|00000ca0| 69 66 66 65 72 65 6e 74 | 20 74 68 61 6e 20 74 68 |ifferent| than th|
|00000cb0| 65 20 6d 65 74 68 6f 64 | 20 66 6f 72 20 63 61 6c |e method| for cal|
|00000cc0| 6c 69 6e 67 20 74 68 65 | 20 52 4f 4d 20 66 72 6f |ling the| ROM fro|
|00000cd0| 6d 20 74 72 61 70 20 70 | 61 74 63 68 65 73 2c 20 |m trap p|atches, |
|00000ce0| 77 68 65 72 65 20 41 35 | 20 73 68 6f 75 6c 64 20 |where A5| should |
|00000cf0| 72 65 74 61 69 6e 20 74 | 68 65 20 76 61 6c 75 65 |retain t|he value|
|00000d00| 20 69 74 20 68 61 64 20 | 75 70 6f 6e 20 65 6e 74 | it had |upon ent|
|00000d10| 72 79 20 74 6f 20 79 6f | 75 72 20 70 61 74 63 68 |ry to yo|ur patch|
|00000d20| 2e 0d 46 75 72 74 68 65 | 72 20 52 65 66 65 72 65 |..Furthe|r Refere|
|00000d30| 6e 63 65 3a 0d a5 09 54 | 68 65 20 4d 65 6d 6f 72 |nce:...T|he Memor|
|00000d40| 79 20 4d 61 6e 61 67 65 | 72 0d a5 09 54 65 63 68 |y Manage|r...Tech|
|00000d50| 6e 69 63 61 6c 20 4e 6f | 74 65 20 4d 2e 4d 45 2e |nical No|te M.ME.|
|00000d60| 47 72 6f 77 5a 6f 6e 65 | 41 35 20 d1 0d 09 09 52 |GrowZone|A5 ....R|
|00000d70| 65 67 69 73 74 65 72 20 | 41 35 20 57 69 74 68 69 |egister |A5 Withi|
|00000d80| 6e 20 54 72 61 70 20 50 | 61 74 63 68 65 73 0d 43 |n Trap P|atches.C|
|00000d90| 6f 70 69 6e 67 20 57 69 | 74 68 20 56 4d 20 61 6e |oping Wi|th VM an|
|00000da0| 64 20 4d 65 6d 6f 72 79 | 20 4d 61 70 70 69 6e 67 |d Memory| Mapping|
|00000db0| 73 0d 4d 65 6d 6f 72 79 | 09 4d 2e 4d 45 2e 56 4d |s.Memory|.M.ME.VM|
|00000dc0| 4d 65 6d 6f 72 79 4d 61 | 70 70 69 6e 67 0d 52 65 |MemoryMa|pping.Re|
|00000dd0| 76 69 73 65 64 20 62 79 | 3a 09 43 72 61 69 67 20 |vised by|:.Craig |
|00000de0| 50 72 6f 75 73 65 09 41 | 70 72 69 6c 20 31 39 39 |Prouse.A|pril 199|
|00000df0| 31 0d 57 72 69 74 74 65 | 6e 20 62 79 3a 09 43 72 |1.Writte|n by:.Cr|
|00000e00| 61 69 67 20 50 72 6f 75 | 73 65 09 46 65 62 72 75 |aig Prou|se.Febru|
|00000e10| 61 72 79 20 31 39 39 31 | 0d 54 68 65 20 70 75 72 |ary 1991|.The pur|
|00000e20| 70 6f 73 65 20 6f 66 20 | 74 68 69 73 20 4e 6f 74 |pose of |this Not|
|00000e30| 65 20 69 73 20 74 77 6f | 66 6f 6c 64 2e 20 20 46 |e is two|fold. F|
|00000e40| 69 72 73 74 2c 20 69 74 | 20 64 65 73 63 72 69 62 |irst, it| describ|
|00000e50| 65 73 20 69 6e 20 64 65 | 74 61 69 6c 20 68 6f 77 |es in de|tail how|
|00000e60| 20 74 6f 20 75 73 65 20 | 74 68 65 20 47 65 74 50 | to use |the GetP|
|00000e70| 68 79 73 69 63 61 6c 20 | 72 6f 75 74 69 6e 65 2e |hysical |routine.|
|00000e80| 20 20 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 69 | This r|outine i|
|00000e90| 73 20 63 72 69 74 69 63 | 61 6c 20 74 6f 20 74 68 |s critic|al to th|
|00000ea0| 65 20 73 75 70 70 6f 72 | 74 20 6f 66 20 61 6c 74 |e suppor|t of alt|
|00000eb0| 65 72 6e 61 74 65 20 62 | 75 73 20 6d 61 73 74 65 |ernate b|us maste|
|00000ec0| 72 73 20 6f 6e 20 63 65 | 72 74 61 69 6e 20 6d 61 |rs on ce|rtain ma|
|00000ed0| 63 68 69 6e 65 73 20 77 | 69 74 68 6f 75 74 20 56 |chines w|ithout V|
|00000ee0| 69 72 74 75 61 6c 20 4d | 65 6d 6f 72 79 20 28 56 |irtual M|emory (V|
|00000ef0| 4d 29 20 61 6e 64 20 61 | 6c 6c 20 6d 61 63 68 69 |M) and a|ll machi|
|00000f00| 6e 65 73 20 77 69 74 68 | 20 56 4d 2e 20 20 49 6e |nes with| VM. In|
|00000f10| 63 6c 75 64 65 64 20 69 | 73 20 61 6e 20 61 6e 63 |cluded i|s an anc|
|00000f20| 69 6c 6c 61 72 79 20 64 | 69 73 63 75 73 73 69 6f |illary d|iscussio|
|00000f30| 6e 20 6f 66 20 73 65 76 | 65 72 61 6c 20 63 6c 6f |n of sev|eral clo|
|00000f40| 73 65 6c 79 2d 72 65 6c | 61 74 65 64 20 56 4d 20 |sely-rel|ated VM |
|00000f50| 72 6f 75 74 69 6e 65 73 | 2e 20 20 53 65 63 6f 6e |routines|. Secon|
|00000f60| 64 2c 20 69 74 20 72 65 | 69 74 65 72 61 74 65 73 |d, it re|iterates|
|00000f70| 20 61 20 6e 75 6d 62 65 | 72 20 6f 66 20 69 73 73 | a numbe|r of iss|
|00000f80| 75 65 73 20 69 6d 70 6f | 72 74 61 6e 74 20 74 6f |ues impo|rtant to|
|00000f90| 20 56 4d 20 63 6f 6d 70 | 61 74 69 62 69 6c 69 74 | VM comp|atibilit|
|00000fa0| 79 20 61 6e 64 20 65 6c | 75 63 69 64 61 74 65 73 |y and el|ucidates|
|00000fb0| 20 73 6f 6d 65 20 6f 66 | 20 74 68 65 20 64 65 65 | some of| the dee|
|00000fc0| 70 65 72 20 56 4d 20 69 | 73 73 75 65 73 20 6f 66 |per VM i|ssues of|
|00000fd0| 20 77 68 69 63 68 20 73 | 70 65 63 69 61 6c 69 7a | which s|pecializ|
|00000fe0| 65 64 20 64 65 76 65 6c | 6f 70 65 72 73 20 73 68 |ed devel|opers sh|
|00000ff0| 6f 75 6c 64 20 62 65 20 | 61 77 61 72 65 2e 20 20 |ould be |aware. |
|00001000| 43 6f 6d 70 61 74 69 62 | 69 6c 69 74 79 20 69 73 |Compatib|ility is|
|00001010| 73 75 65 73 20 61 72 65 | 20 65 73 70 65 63 69 61 |sues are| especia|
|00001020| 6c 6c 79 20 69 6d 70 6f | 72 74 61 6e 74 20 66 6f |lly impo|rtant fo|
|00001030| 72 20 64 65 76 65 6c 6f | 70 65 72 73 20 6f 66 20 |r develo|pers of |
|00001040| 53 43 53 49 20 64 72 69 | 76 65 72 73 2c 20 4e 75 |SCSI dri|vers, Nu|
|00001050| 42 75 73 aa 20 6d 61 73 | 74 65 72 20 68 61 72 64 |Bus. mas|ter hard|
|00001060| 77 61 72 65 2c 20 61 6e | 64 20 63 6f 64 65 20 77 |ware, an|d code w|
|00001070| 68 69 63 68 20 72 75 6e | 73 20 61 74 20 69 6e 74 |hich run|s at int|
|00001080| 65 72 72 75 70 74 20 74 | 69 6d 65 2e 0d 43 68 61 |errupt t|ime..Cha|
|00001090| 6e 67 65 73 20 73 69 6e | 63 65 20 46 65 62 72 75 |nges sin|ce Febru|
|000010a0| 61 72 79 20 20 31 39 39 | 31 3a 20 54 68 69 73 20 |ary 199|1: This |
|000010b0| 75 70 64 61 74 65 20 69 | 6e 63 6f 72 70 6f 72 61 |update i|ncorpora|
|000010c0| 74 65 73 20 6e 65 77 20 | 69 73 73 75 65 73 20 77 |tes new |issues w|
|000010d0| 68 69 63 68 20 68 61 76 | 65 20 63 6f 6d 65 20 75 |hich hav|e come u|
|000010e0| 70 20 64 75 72 69 6e 67 | 20 53 79 73 74 65 6d 20 |p during| System |
|000010f0| 37 2e 30 20 62 65 74 61 | 20 74 65 73 74 69 6e 67 |7.0 beta| testing|
|00001100| 2c 20 61 6e 64 20 69 74 | 20 61 6c 73 6f 20 61 74 |, and it| also at|
|00001110| 74 65 6d 70 74 73 20 74 | 6f 20 63 6c 61 72 69 66 |tempts t|o clarif|
|00001120| 79 20 73 6f 6d 65 20 69 | 73 73 75 65 73 20 77 68 |y some i|ssues wh|
|00001130| 69 63 68 20 68 61 76 65 | 20 70 72 6f 76 65 6e 20 |ich have| proven |
|00001140| 74 6f 20 62 65 20 70 61 | 72 74 69 63 75 6c 61 72 |to be pa|rticular|
|00001150| 6c 79 20 74 72 6f 75 62 | 6c 65 73 6f 6d 65 20 6f |ly troub|lesome o|
|00001160| 72 20 77 69 64 65 6c 79 | 20 6d 69 73 75 6e 64 65 |r widely| misunde|
|00001170| 72 73 74 6f 6f 64 2e 0d | 45 76 65 72 79 62 6f 64 |rstood..|Everybod|
|00001180| 79 20 4d 75 73 74 20 47 | 65 74 20 50 68 79 73 69 |y Must G|et Physi|
|00001190| 63 61 6c 0d 49 66 20 79 | 6f 75 20 61 72 65 20 64 |cal.If y|ou are d|
|000011a0| 65 76 65 6c 6f 70 69 6e | 67 20 4e 75 42 75 73 20 |evelopin|g NuBus |
|000011b0| 65 78 70 61 6e 73 69 6f | 6e 20 63 61 72 64 73 20 |expansio|n cards |
|000011c0| 77 69 74 68 20 62 75 73 | 20 6d 61 73 74 65 72 73 |with bus| masters|
|000011d0| 68 69 70 20 6f 72 20 64 | 69 72 65 63 74 20 6d 65 |hip or d|irect me|
|000011e0| 6d 6f 72 79 20 61 63 63 | 65 73 73 20 28 44 4d 41 |mory acc|ess (DMA|
|000011f0| 29 20 63 61 70 61 62 69 | 6c 69 74 69 65 73 2c 20 |) capabi|lities, |
|00001200| 61 6e 64 20 69 66 20 79 | 6f 75 20 68 61 76 65 20 |and if y|ou have |
|00001210| 65 76 65 72 20 64 6f 6e | 65 20 64 65 76 65 6c 6f |ever don|e develo|
|00001220| 70 6d 65 6e 74 20 6f 72 | 20 63 6f 6d 70 61 74 69 |pment or| compati|
|00001230| 62 69 6c 69 74 79 20 74 | 65 73 74 69 6e 67 20 77 |bility t|esting w|
|00001240| 69 74 68 20 41 70 70 6c | 65 d5 73 20 72 65 63 65 |ith Appl|e.s rece|
|00001250| 6e 74 20 6d 61 63 68 69 | 6e 65 73 2c 20 6c 69 6b |nt machi|nes, lik|
|00001260| 65 20 74 68 65 20 4d 61 | 63 69 6e 74 6f 73 68 20 |e the Ma|cintosh |
|00001270| 49 49 63 69 20 61 6e 64 | 20 4d 61 63 69 6e 74 6f |IIci and| Macinto|
|00001280| 73 68 20 49 49 73 69 2c | 20 79 6f 75 20 68 61 76 |sh IIsi,| you hav|
|00001290| 65 20 75 6e 64 6f 75 62 | 74 65 64 6c 79 20 6e 6f |e undoub|tedly no|
|000012a0| 74 69 63 65 64 20 73 6f | 6d 65 20 73 74 72 61 6e |ticed so|me stran|
|000012b0| 67 65 20 62 65 68 61 76 | 69 6f 72 2e 20 20 59 6f |ge behav|ior. Yo|
|000012c0| 75 20 6d 69 67 68 74 20 | 74 65 6c 6c 20 74 68 65 |u might |tell the|
|000012d0| 20 63 61 72 64 20 74 6f | 20 64 75 6d 70 20 64 61 | card to| dump da|
|000012e0| 74 61 20 69 6e 74 6f 20 | 61 20 62 75 66 66 65 72 |ta into |a buffer|
|000012f0| 20 61 74 20 24 30 30 33 | 30 30 30 30 30 20 61 6e | at $003|00000 an|
|00001300| 64 20 74 68 65 20 64 61 | 74 61 20 69 6e 73 74 65 |d the da|ta inste|
|00001310| 61 64 20 61 70 70 65 61 | 72 73 20 61 74 20 24 30 |ad appea|rs at $0|
|00001320| 30 36 42 30 30 30 30 2e | 20 20 d2 57 68 61 74 d5 |06B0000.| .What.|
|00001330| 73 20 68 61 70 70 65 6e | 69 6e 67 20 68 65 72 65 |s happen|ing here|
|00001340| 3f d3 20 79 6f 75 20 6d | 75 73 74 20 61 73 6b 20 |?. you m|ust ask |
|00001350| 79 6f 75 72 73 65 6c 66 | 2e 0d 57 65 6c 6c 2c 20 |yourself|..Well, |
|00001360| 74 68 65 72 65 d5 73 20 | 61 20 6e 65 77 20 67 61 |there.s |a new ga|
|00001370| 6d 65 20 69 6e 20 74 6f | 77 6e d1 69 74 d5 73 20 |me in to|wn.it.s |
|00001380| 63 61 6c 6c 65 64 20 61 | 20 64 69 73 63 6f 6e 74 |called a| discont|
|00001390| 69 67 75 6f 75 73 20 70 | 68 79 73 69 63 61 6c 20 |iguous p|hysical |
|000013a0| 61 64 64 72 65 73 73 20 | 73 70 61 63 65 2e 20 20 |address |space. |
|000013b0| 57 68 61 74 20 74 68 61 | 74 20 6d 65 61 6e 73 20 |What tha|t means |
|000013c0| 69 6e 20 73 69 6d 70 6c | 65 20 74 65 72 6d 73 20 |in simpl|e terms |
|000013d0| 69 73 20 74 68 61 74 20 | 74 68 65 72 65 20 69 73 |is that |there is|
|000013e0| 20 70 6f 74 65 6e 74 69 | 61 6c 6c 79 20 61 20 62 | potenti|ally a b|
|000013f0| 69 67 20 68 6f 6c 65 20 | 69 6e 20 6d 65 6d 6f 72 |ig hole |in memor|
|00001400| 79 2e 20 20 49 66 20 79 | 6f 75 20 68 61 76 65 20 |y. If y|ou have |
|00001410| 65 69 67 68 74 20 6d 65 | 67 61 62 79 74 65 73 20 |eight me|gabytes |
|00001420| 69 6e 73 74 61 6c 6c 65 | 64 20 69 6e 20 61 20 4d |installe|d in a M|
|00001430| 61 63 69 6e 74 6f 73 68 | 20 49 49 63 69 2c 20 66 |acintosh| IIci, f|
|00001440| 6f 72 20 69 6e 73 74 61 | 6e 63 65 2c 20 74 68 61 |or insta|nce, tha|
|00001450| 74 20 6d 65 6d 6f 72 79 | 20 61 70 70 65 61 72 73 |t memory| appears|
|00001460| 20 74 6f 20 74 68 65 20 | 43 50 55 20 61 6e 64 20 | to the |CPU and |
|00001470| 74 6f 20 4e 75 42 75 73 | 20 69 6e 20 74 77 6f 20 |to NuBus| in two |
|00001480| 73 65 70 61 72 61 74 65 | 20 34 20 4d 42 20 72 61 |separate| 4 MB ra|
|00001490| 6e 67 65 73 3a 20 5b 24 | 30 30 30 30 30 30 30 30 |nges: [$|00000000|
|000014a0| 20 d0 20 24 30 30 33 46 | 46 46 46 46 5d 20 61 6e | . $003F|FFFF] an|
|000014b0| 64 20 5b 24 30 34 30 30 | 30 30 30 30 20 d0 20 24 |d [$0400|0000 . $|
|000014c0| 30 34 33 46 46 46 46 46 | 5d 2e 20 20 45 76 65 72 |043FFFFF|]. Ever|
|000014d0| 79 74 68 69 6e 67 20 66 | 72 6f 6d 20 74 68 65 20 |ything f|rom the |
|000014e0| 65 6e 64 20 6f 66 20 42 | 61 6e 6b 20 41 20 74 6f |end of B|ank A to|
|000014f0| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | the beg|inning o|
|00001500| 66 20 42 61 6e 6b 20 42 | 20 69 73 20 65 73 73 65 |f Bank B| is esse|
|00001510| 6e 74 69 61 6c 6c 79 20 | 65 6d 70 74 79 2e 20 42 |ntially |empty. B|
|00001520| 61 6e 6b 20 42 20 6d 65 | 6d 6f 72 79 20 64 6f 65 |ank B me|mory doe|
|00001530| 73 20 6e 6f 74 20 73 74 | 61 72 74 20 75 6e 74 69 |s not st|art unti|
|00001540| 6c 20 61 74 20 6c 65 61 | 73 74 20 24 30 34 30 30 |l at lea|st $0400|
|00001550| 30 30 30 30 2e 0d 54 6f | 20 63 6f 6d 70 65 6e 73 |0000..To| compens|
|00001560| 61 74 65 20 66 6f 72 20 | 74 68 69 73 2c 20 74 68 |ate for |this, th|
|00001570| 65 20 6f 70 65 72 61 74 | 69 6e 67 20 73 79 73 74 |e operat|ing syst|
|00001580| 65 6d 20 75 73 65 73 20 | 74 68 65 20 6d 65 6d 6f |em uses |the memo|
|00001590| 72 79 20 6d 61 6e 61 67 | 65 6d 65 6e 74 20 75 6e |ry manag|ement un|
|000015a0| 69 74 20 28 4d 4d 55 29 | 20 74 6f 20 6d 61 70 20 |it (MMU)| to map |
|000015b0| 61 6c 6c 20 74 68 65 20 | 70 68 79 73 69 63 61 6c |all the |physical|
|000015c0| 20 6d 65 6d 6f 72 79 20 | 28 77 68 61 74 20 74 68 | memory |(what th|
|000015d0| 65 20 68 61 72 64 77 61 | 72 65 20 73 65 65 73 29 |e hardwa|re sees)|
|000015e0| 20 69 6e 74 6f 20 61 20 | 73 69 6e 67 6c 65 20 63 | into a |single c|
|000015f0| 6f 6e 74 69 67 75 6f 75 | 73 20 6c 6f 67 69 63 61 |ontiguou|s logica|
|00001600| 6c 20 61 64 64 72 65 73 | 73 20 73 70 61 63 65 20 |l addres|s space |
|00001610| 28 77 68 61 74 20 61 6c | 6c 20 4d 61 63 69 6e 74 |(what al|l Macint|
|00001620| 6f 73 68 20 63 6f 64 65 | 20 73 65 65 73 29 2e 20 |osh code| sees). |
|00001630| 20 54 68 65 20 6c 6f 67 | 69 63 61 6c 20 61 64 64 | The log|ical add|
|00001640| 72 65 73 73 20 73 70 61 | 63 65 20 6c 6f 6f 6b 73 |ress spa|ce looks|
|00001650| 20 65 78 61 63 74 6c 79 | 20 6c 69 6b 65 20 74 68 | exactly| like th|
|00001660| 65 20 6d 65 6d 6f 72 79 | 20 6d 61 70 20 79 6f 75 |e memory| map you|
|00001670| d5 76 65 20 6b 6e 6f 77 | 6e 20 66 6f 72 20 79 65 |.ve know|n for ye|
|00001680| 61 72 73 2e 20 20 54 68 | 65 20 74 72 61 6e 73 6c |ars. Th|e transl|
|00001690| 61 74 69 6f 6e 20 69 73 | 20 63 6f 6d 70 6c 65 74 |ation is| complet|
|000016a0| 65 6c 79 20 74 72 61 6e | 73 70 61 72 65 6e 74 20 |ely tran|sparent |
|000016b0| 74 6f 20 73 6f 66 74 77 | 61 72 65 2e 20 20 49 66 |to softw|are. If|
|000016c0| 20 79 6f 75 d5 72 65 20 | 61 6e 20 61 70 70 6c 69 | you.re |an appli|
|000016d0| 63 61 74 69 6f 6e 73 20 | 64 65 76 65 6c 6f 70 65 |cations |develope|
|000016e0| 72 20 61 6e 64 20 79 6f | 75 20 72 65 61 64 20 74 |r and yo|u read t|
|000016f0| 68 65 20 6c 6f 77 2d 6d | 65 6d 6f 72 79 20 67 6c |he low-m|emory gl|
|00001700| 6f 62 61 6c 20 61 74 20 | 24 31 30 43 2c 20 79 6f |obal at |$10C, yo|
|00001710| 75 20 64 6f 6e d5 74 20 | 63 61 72 65 20 74 68 61 |u don.t |care tha|
|00001720| 74 20 74 68 65 20 61 64 | 64 72 65 73 73 20 74 68 |t the ad|dress th|
|00001730| 61 74 20 74 68 65 20 70 | 72 6f 63 65 73 73 6f 72 |at the p|rocessor|
|00001740| 20 61 63 74 75 61 6c 6c | 79 20 6c 6f 6f 6b 73 20 | actuall|y looks |
|00001750| 61 74 20 69 73 20 24 30 | 34 30 30 30 31 30 43 2e |at is $0|400010C.|
|00001760| 20 20 57 68 65 6e 20 74 | 68 65 20 70 72 6f 63 65 | When t|he proce|
|00001770| 73 73 6f 72 20 6f 72 69 | 67 69 6e 61 6c 6c 79 20 |ssor ori|ginally |
|00001780| 70 75 74 20 61 20 76 61 | 6c 75 65 20 69 6e 20 74 |put a va|lue in t|
|00001790| 68 61 74 20 73 70 6f 74 | 2c 20 69 74 20 77 65 6e |hat spot|, it wen|
|000017a0| 74 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 73 61 |t throug|h the sa|
|000017b0| 6d 65 20 74 72 61 6e 73 | 6c 61 74 69 6f 6e 2e 20 |me trans|lation. |
|000017c0| 20 45 76 65 72 79 74 68 | 69 6e 67 20 69 73 20 72 | Everyth|ing is r|
|000017d0| 65 6c 61 74 69 76 65 20 | 61 6e 64 20 79 6f 75 20 |elative |and you |
|000017e0| 61 6c 77 61 79 73 20 67 | 65 74 20 6a 75 73 74 20 |always g|et just |
|000017f0| 77 68 61 74 20 79 6f 75 | d5 64 20 65 78 70 65 63 |what you|.d expec|
|00001800| 74 2e 0d 54 68 65 20 73 | 6f 6c 65 20 65 78 63 65 |t..The s|ole exce|
|00001810| 70 74 69 6f 6e 20 69 73 | 20 66 6f 72 20 73 6f 66 |ption is| for sof|
|00001820| 74 77 61 72 65 20 77 68 | 69 63 68 20 72 75 6e 73 |tware wh|ich runs|
|00001830| 20 6f 6e 20 74 68 65 20 | 4d 61 63 69 6e 74 6f 73 | on the |Macintos|
|00001840| 68 20 62 75 74 20 63 6f | 6d 6d 75 6e 69 63 61 74 |h but co|mmunicat|
|00001850| 65 73 20 61 64 64 72 65 | 73 73 65 73 20 74 6f 20 |es addre|sses to |
|00001860| 4e 75 42 75 73 20 6d 61 | 73 74 65 72 20 68 61 72 |NuBus ma|ster har|
|00001870| 64 77 61 72 65 2e 20 20 | 53 61 79 2c 20 66 6f 72 |dware. |Say, for|
|00001880| 20 69 6e 73 74 61 6e 63 | 65 2c 20 74 68 61 74 20 | instanc|e, that |
|00001890| 79 6f 75 20 68 61 76 65 | 20 64 65 76 65 6c 6f 70 |you have| develop|
|000018a0| 65 64 20 61 20 76 69 64 | 65 6f 20 66 72 61 6d 65 |ed a vid|eo frame|
|000018b0| 20 67 72 61 62 62 65 72 | 20 77 68 69 63 68 20 64 | grabber| which d|
|000018c0| 75 6d 70 73 20 61 6e 20 | 69 6d 61 67 65 20 69 6e |umps an |image in|
|000018d0| 74 6f 20 61 20 68 61 6e | 64 6c 65 20 79 6f 75 d5 |to a han|dle you.|
|000018e0| 76 65 20 61 6c 6c 6f 63 | 61 74 65 64 20 66 6f 72 |ve alloc|ated for|
|000018f0| 20 74 68 61 74 20 70 75 | 72 70 6f 73 65 2e 20 20 | that pu|rpose. |
|00001900| 57 68 65 6e 20 79 6f 75 | 20 63 61 6c 6c 20 5f 4e |When you| call _N|
|00001910| 65 77 48 61 6e 64 6c 65 | 20 77 69 74 68 20 61 6e |ewHandle| with an|
|00001920| 20 61 72 67 75 6d 65 6e | 74 20 6f 66 20 66 72 61 | argumen|t of fra|
|00001930| 6d 65 53 69 7a 65 2c 20 | 79 6f 75 20 67 65 74 20 |meSize, |you get |
|00001940| 62 61 63 6b 20 61 20 6c | 6f 67 69 63 61 6c 20 61 |back a l|ogical a|
|00001950| 64 64 72 65 73 73 2e 20 | 20 49 66 20 79 6f 75 20 |ddress. | If you |
|00001960| 75 73 65 20 61 20 36 38 | 30 33 30 2c 20 6f 72 20 |use a 68|030, or |
|00001970| 61 20 36 38 30 32 30 20 | 77 69 74 68 20 61 20 36 |a 68020 |with a 6|
|00001980| 38 38 35 31 20 50 4d 4d | 55 2c 20 74 6f 20 73 74 |8851 PMM|U, to st|
|00001990| 6f 72 65 20 64 61 74 61 | 20 69 6e 74 6f 20 74 68 |ore data| into th|
|000019a0| 61 74 20 68 61 6e 64 6c | 65 2c 20 74 68 65 20 4d |at handl|e, the M|
|000019b0| 4d 55 20 70 65 72 66 6f | 72 6d 73 20 61 6e 20 61 |MU perfo|rms an a|
|000019c0| 64 64 72 65 73 73 20 74 | 72 61 6e 73 6c 61 74 69 |ddress t|ranslati|
|000019d0| 6f 6e 20 61 6e 64 20 70 | 6c 61 63 65 73 20 64 61 |on and p|laces da|
|000019e0| 74 61 20 69 6e 74 6f 20 | 61 20 63 6f 72 72 65 73 |ta into |a corres|
|000019f0| 70 6f 6e 64 69 6e 67 20 | 70 68 79 73 69 63 61 6c |ponding |physical|
|00001a00| 20 61 64 64 72 65 73 73 | 2e 20 20 4e 75 42 75 73 | address|. NuBus|
|00001a10| 20 68 61 72 64 77 61 72 | 65 2c 20 68 6f 77 65 76 | hardwar|e, howev|
|00001a20| 65 72 2c 20 64 6f 65 73 | 20 6e 6f 74 20 75 73 65 |er, does| not use|
|00001a30| 20 74 68 65 20 4d 4d 55 | d5 73 20 61 64 64 72 65 | the MMU|.s addre|
|00001a40| 73 73 20 6d 61 70 70 69 | 6e 67 20 74 61 62 6c 65 |ss mappi|ng table|
|00001a50| 73 2e 20 20 49 66 20 79 | 6f 75 72 20 64 72 69 76 |s. If y|our driv|
|00001a60| 65 72 20 70 61 73 73 65 | 73 20 61 6c 6f 6e 67 20 |er passe|s along |
|00001a70| 61 20 6c 6f 67 69 63 61 | 6c 20 61 64 64 72 65 73 |a logica|l addres|
|00001a80| 73 20 66 72 6f 6d 20 74 | 68 65 20 4d 65 6d 6f 72 |s from t|he Memor|
|00001a90| 79 20 4d 61 6e 61 67 65 | 72 2c 20 74 68 65 20 66 |y Manage|r, the f|
|00001aa0| 72 61 6d 65 20 67 72 61 | 62 62 65 72 20 64 6f 65 |rame gra|bber doe|
|00001ab0| 73 20 6e 6f 74 20 6b 6e | 6f 77 20 74 6f 20 74 72 |s not kn|ow to tr|
|00001ac0| 61 6e 73 6c 61 74 65 20 | 69 74 20 28 69 6e 64 65 |anslate |it (inde|
|00001ad0| 65 64 20 69 74 20 63 61 | 6e 6e 6f 74 29 2c 20 61 |ed it ca|nnot), a|
|00001ae0| 6e 64 20 74 68 65 20 6c | 6f 67 69 63 61 6c 20 61 |nd the l|ogical a|
|00001af0| 64 64 72 65 73 73 20 69 | 73 20 69 6e 74 65 72 70 |ddress i|s interp|
|00001b00| 72 65 74 65 64 20 61 73 | 20 61 20 70 68 79 73 69 |reted as| a physi|
|00001b10| 63 61 6c 20 61 64 64 72 | 65 73 73 2e 20 20 45 78 |cal addr|ess. Ex|
|00001b20| 74 65 72 6e 61 6c 20 68 | 61 72 64 77 61 72 65 20 |ternal h|ardware |
|00001b30| 6d 61 79 20 64 75 6d 70 | 20 61 20 62 65 61 75 74 |may dump| a beaut|
|00001b40| 69 66 75 6c 20 63 61 70 | 74 75 72 65 64 20 69 6d |iful cap|tured im|
|00001b50| 61 67 65 20 77 65 6c 6c | 20 6f 75 74 73 69 64 65 |age well| outside|
|00001b60| 20 79 6f 75 72 20 63 61 | 72 65 66 75 6c 6c 79 20 | your ca|refully |
|00001b70| 61 6c 6c 6f 63 61 74 65 | 64 20 68 61 6e 64 6c 65 |allocate|d handle|
|00001b80| 20 61 6e 64 20 70 65 72 | 68 61 70 73 20 72 69 67 | and per|haps rig|
|00001b90| 68 74 20 61 63 72 6f 73 | 73 20 74 68 65 20 74 6f |ht acros|s the to|
|00001ba0| 70 20 6f 66 20 4d 61 63 | 73 42 75 67 20 61 6e 64 |p of Mac|sBug and|
|00001bb0| 20 6f 74 68 65 72 20 73 | 69 6d 69 6c 61 72 6c 79 | other s|imilarly|
|00001bc0| 20 69 6d 70 6f 72 74 61 | 6e 74 20 74 68 69 6e 67 | importa|nt thing|
|00001bd0| 73 2e 20 20 42 75 67 73 | 20 6c 69 6b 65 20 74 68 |s. Bugs| like th|
|00001be0| 69 73 20 61 72 65 20 65 | 78 74 72 65 6d 65 6c 79 |is are e|xtremely|
|00001bf0| 20 64 69 66 66 69 63 75 | 6c 74 20 74 6f 20 69 73 | difficu|lt to is|
|00001c00| 6f 6c 61 74 65 20 75 6e | 6c 65 73 73 20 79 6f 75 |olate un|less you|
|00001c10| 20 75 6e 64 65 72 73 74 | 61 6e 64 20 74 68 65 69 | underst|and thei|
|00001c20| 72 20 62 65 68 61 76 69 | 6f 72 20 61 6e 64 20 61 |r behavi|or and a|
|00001c30| 6e 74 69 63 69 70 61 74 | 65 20 74 68 65 6d 2e 0d |nticipat|e them..|
|00001c40| 54 68 65 20 70 6f 69 6e | 74 20 69 73 2c 20 6e 6f |The poin|t is, no|
|00001c50| 77 20 79 6f 75 20 6d 75 | 73 74 20 62 65 20 73 75 |w you mu|st be su|
|00001c60| 72 65 20 74 6f 20 61 6c | 77 61 79 73 20 63 6f 6e |re to al|ways con|
|00001c70| 76 65 72 74 20 6c 6f 67 | 69 63 61 6c 20 61 64 64 |vert log|ical add|
|00001c80| 72 65 73 73 65 73 20 74 | 6f 20 63 6f 72 72 65 73 |resses t|o corres|
|00001c90| 70 6f 6e 64 69 6e 67 20 | 70 68 79 73 69 63 61 6c |ponding |physical|
|00001ca0| 20 61 64 64 72 65 73 73 | 65 73 20 62 65 66 6f 72 | address|es befor|
|00001cb0| 65 20 70 61 73 73 69 6e | 67 20 74 68 65 6d 20 74 |e passin|g them t|
|00001cc0| 6f 20 61 6e 79 20 61 6c | 74 65 72 6e 61 74 65 20 |o any al|ternate |
|00001cd0| 62 75 73 20 6d 61 73 74 | 65 72 2e 20 20 41 20 6e |bus mast|er. A n|
|00001ce0| 65 77 20 66 75 6e 63 74 | 69 6f 6e 20 74 6f 20 73 |ew funct|ion to s|
|00001cf0| 75 70 70 6f 72 74 20 74 | 68 69 73 20 69 73 20 47 |upport t|his is G|
|00001d00| 65 74 50 68 79 73 69 63 | 61 6c 2c 20 77 68 69 63 |etPhysic|al, whic|
|00001d10| 68 20 69 73 20 64 6f 63 | 75 6d 65 6e 74 65 64 20 |h is doc|umented |
|00001d20| 69 6e 20 49 6e 73 69 64 | 65 20 4d 61 63 69 6e 74 |in Insid|e Macint|
|00001d30| 6f 73 68 2c 20 56 6f 6c | 75 6d 65 20 56 49 2e 20 |osh, Vol|ume VI. |
|00001d40| 20 d2 47 72 65 61 74 2c | d3 20 79 6f 75 20 73 61 | .Great,|. you sa|
|00001d50| 79 2c 20 6f 6e 63 65 20 | 79 6f 75 d5 76 65 20 72 |y, once |you.ve r|
|00001d60| 65 61 64 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |ead the |document|
|00001d70| 61 74 69 6f 6e 2e 20 20 | d2 42 75 74 20 47 65 74 |ation. |.But Get|
|00001d80| 50 68 79 73 69 63 61 6c | 20 69 73 20 61 20 53 79 |Physical| is a Sy|
|00001d90| 73 74 65 6d 20 53 6f 66 | 74 77 61 72 65 20 37 2e |stem Sof|tware 7.|
|00001da0| 30 20 66 65 61 74 75 72 | 65 20 61 6e 64 20 61 20 |0 featur|e and a |
|00001db0| 56 69 72 74 75 61 6c 20 | 4d 65 6d 6f 72 79 20 66 |Virtual |Memory f|
|00001dc0| 65 61 74 75 72 65 20 74 | 6f 20 62 6f 6f 74 2e 20 |eature t|o boot. |
|00001dd0| 20 57 68 61 74 20 64 6f | 20 49 20 64 6f 20 66 6f | What do| I do fo|
|00001de0| 72 20 53 79 73 74 65 6d | 20 36 2e 30 2e 78 20 6f |r System| 6.0.x o|
|00001df0| 72 20 69 66 20 49 d5 6d | 20 6e 6f 74 20 72 75 6e |r if I.m| not run|
|00001e00| 6e 69 6e 67 20 56 4d 3f | d3 0d 49 d5 6d 20 67 6c |ning VM?|..I.m gl|
|00001e10| 61 64 20 79 6f 75 20 61 | 73 6b 65 64 2c 20 62 65 |ad you a|sked, be|
|00001e20| 63 61 75 73 65 20 56 4d | 20 61 6e 64 20 74 68 65 |cause VM| and the|
|00001e30| 20 6d 65 6d 6f 72 79 20 | 61 72 63 68 69 74 65 63 | memory |architec|
|00001e40| 74 75 72 65 20 6f 66 20 | 74 68 65 20 4d 61 63 69 |ture of |the Maci|
|00001e50| 6e 74 6f 73 68 20 49 49 | 63 69 20 61 72 65 20 72 |ntosh II|ci are r|
|00001e60| 65 6c 61 74 65 64 20 74 | 6f 70 69 63 73 2e 20 20 |elated t|opics. |
|00001e70| 47 65 74 50 68 79 73 69 | 63 61 6c 2c 20 61 20 72 |GetPhysi|cal, a r|
|00001e80| 6f 75 74 69 6e 65 20 72 | 65 71 75 69 72 65 64 20 |outine r|equired |
|00001e90| 62 79 20 74 68 65 20 49 | 49 63 69 2c 20 69 73 20 |by the I|Ici, is |
|00001ea0| 6f 6e 65 20 6f 66 20 61 | 20 73 75 69 74 65 20 6f |one of a| suite o|
|00001eb0| 66 20 66 75 6e 63 74 69 | 6f 6e 73 20 64 69 73 70 |f functi|ons disp|
|00001ec0| 61 74 63 68 65 64 20 62 | 79 20 61 20 74 72 61 70 |atched b|y a trap|
|00001ed0| 20 63 61 6c 6c 65 64 20 | 5f 4d 65 6d 6f 72 79 44 | called |_MemoryD|
|00001ee0| 69 73 70 61 74 63 68 20 | 28 24 41 30 35 43 29 2c |ispatch |($A05C),|
|00001ef0| 20 77 68 69 63 68 20 69 | 73 20 74 68 65 20 73 61 | which i|s the sa|
|00001f00| 6d 65 20 74 72 61 70 20 | 75 73 65 64 20 62 79 20 |me trap |used by |
|00001f10| 74 68 65 20 6d 61 6a 6f | 72 20 56 4d 20 63 61 6c |the majo|r VM cal|
|00001f20| 6c 73 2e 20 20 42 65 63 | 61 75 73 65 20 73 6f 6d |ls. Bec|ause som|
|00001f30| 65 20 6d 61 63 68 69 6e | 65 73 20 72 65 71 75 69 |e machin|es requi|
|00001f40| 72 65 20 47 65 74 50 68 | 79 73 69 63 61 6c 20 65 |re GetPh|ysical e|
|00001f50| 76 65 6e 20 77 69 74 68 | 6f 75 74 20 56 4d 2c 20 |ven with|out VM, |
|00001f60| 74 68 6f 73 65 20 6d 61 | 63 68 69 6e 65 73 20 68 |those ma|chines h|
|00001f70| 61 76 65 20 61 20 6c 69 | 6d 69 74 65 64 20 66 6f |ave a li|mited fo|
|00001f80| 72 6d 20 6f 66 20 5f 4d | 65 6d 6f 72 79 44 69 73 |rm of _M|emoryDis|
|00001f90| 70 61 74 63 68 20 69 6d | 70 6c 65 6d 65 6e 74 65 |patch im|plemente|
|00001fa0| 64 20 69 6e 20 52 4f 4d | 2e 0d 59 6f 75 20 63 61 |d in ROM|..You ca|
|00001fb0| 6e 20 63 61 6c 6c 20 47 | 65 74 50 68 79 73 69 63 |n call G|etPhysic|
|00001fc0| 61 6c 20 75 6e 64 65 72 | 20 53 79 73 74 65 6d 20 |al under| System |
|00001fd0| 36 2e 30 2e 78 20 6f 72 | 20 75 6e 64 65 72 20 53 |6.0.x or| under S|
|00001fe0| 79 73 74 65 6d 20 37 2e | 30 20 65 76 65 6e 20 77 |ystem 7.|0 even w|
|00001ff0| 68 65 6e 20 56 4d 20 69 | 73 20 6e 6f 74 20 72 75 |hen VM i|s not ru|
|00002000| 6e 6e 69 6e 67 d1 61 6c | 6c 20 79 6f 75 20 6d 75 |nning.al|l you mu|
|00002010| 73 74 20 64 6f 20 66 69 | 72 73 74 20 69 73 20 63 |st do fi|rst is c|
|00002020| 68 65 63 6b 20 74 6f 20 | 73 65 65 20 74 68 61 74 |heck to |see that|
|00002030| 20 74 68 65 20 5f 4d 65 | 6d 6f 72 79 44 69 73 70 | the _Me|moryDisp|
|00002040| 61 74 63 68 20 74 72 61 | 70 20 69 73 20 69 6d 70 |atch tra|p is imp|
|00002050| 6c 65 6d 65 6e 74 65 64 | 2e 20 20 49 66 20 74 68 |lemented|. If th|
|00002060| 69 73 20 74 72 61 70 20 | 69 73 20 69 6d 70 6c 65 |is trap |is imple|
|00002070| 6d 65 6e 74 65 64 2c 20 | 69 74 20 69 73 20 74 68 |mented, |it is th|
|00002080| 65 72 65 20 66 6f 72 20 | 61 20 72 65 61 73 6f 6e |ere for |a reason|
|00002090| 2c 20 61 6e 64 20 79 6f | 75 20 73 68 6f 75 6c 64 |, and yo|u should|
|000020a0| 20 75 73 65 20 69 74 2e | 20 20 41 6c 74 68 6f 75 | use it.| Althou|
|000020b0| 67 68 20 47 65 74 50 68 | 79 73 69 63 61 6c 20 69 |gh GetPh|ysical i|
|000020c0| 73 20 70 72 65 73 65 6e | 74 20 6f 6e 6c 79 20 66 |s presen|t only f|
|000020d0| 6f 72 20 63 65 72 74 61 | 69 6e 20 6d 61 63 68 69 |or certa|in machi|
|000020e0| 6e 65 73 20 77 69 74 68 | 6f 75 74 20 56 4d 2c 20 |nes with|out VM, |
|000020f0| 69 74 20 69 73 20 70 72 | 65 73 65 6e 74 20 61 6e |it is pr|esent an|
|00002100| 64 20 72 65 71 75 69 72 | 65 64 20 66 6f 72 20 61 |d requir|ed for a|
|00002110| 6c 6c 20 6d 61 63 68 69 | 6e 65 73 20 72 75 6e 6e |ll machi|nes runn|
|00002120| 69 6e 67 20 56 4d 2e 20 | 20 49 66 20 79 6f 75 20 |ing VM. | If you |
|00002130| 75 70 64 61 74 65 20 79 | 6f 75 72 20 63 6f 64 65 |update y|our code|
|00002140| 20 74 6f 20 62 65 20 63 | 6f 6d 70 61 74 69 62 6c | to be c|ompatibl|
|00002150| 65 20 77 69 74 68 20 74 | 68 65 20 49 49 63 69 20 |e with t|he IIci |
|00002160| 61 6e 64 20 49 49 73 69 | 20 69 6e 20 74 68 65 20 |and IIsi| in the |
|00002170| 36 2e 30 2e 78 20 77 6f | 72 6c 64 2c 20 79 6f 75 |6.0.x wo|rld, you|
|00002180| 20 61 72 65 20 61 6c 72 | 65 61 64 79 20 64 6f 69 | are alr|eady doi|
|00002190| 6e 67 20 70 61 72 74 20 | 6f 66 20 77 68 61 74 20 |ng part |of what |
|000021a0| 69 73 20 72 65 71 75 69 | 72 65 64 20 74 6f 20 62 |is requi|red to b|
|000021b0| 65 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 77 69 74 |e compat|ible wit|
|000021c0| 68 20 56 69 72 74 75 61 | 6c 20 4d 65 6d 6f 72 79 |h Virtua|l Memory|
|000021d0| 20 61 6e 64 20 53 79 73 | 74 65 6d 20 53 6f 66 74 | and Sys|tem Soft|
|000021e0| 77 61 72 65 20 37 2e 30 | 2e 0d 48 6f 6c 64 69 6e |ware 7.0|..Holdin|
|000021f0| 67 20 61 6e 64 20 4c 6f | 63 6b 69 6e 67 20 4d 65 |g and Lo|cking Me|
|00002200| 6d 6f 72 79 20 56 65 72 | 73 75 73 20 4c 6f 63 6b |mory Ver|sus Lock|
|00002210| 69 6e 67 20 48 61 6e 64 | 6c 65 73 0d 56 69 72 74 |ing Hand|les.Virt|
|00002220| 75 61 6c 20 4d 65 6d 6f | 72 79 20 69 6e 74 72 6f |ual Memo|ry intro|
|00002230| 64 75 63 65 73 20 74 77 | 6f 20 6e 65 77 20 63 6f |duces tw|o new co|
|00002240| 6e 63 65 70 74 73 d1 68 | 6f 6c 64 69 6e 67 20 61 |ncepts.h|olding a|
|00002250| 6e 64 20 6c 6f 63 6b 69 | 6e 67 20 61 20 72 61 6e |nd locki|ng a ran|
|00002260| 67 65 20 6f 66 20 76 69 | 72 74 75 61 6c 20 6d 65 |ge of vi|rtual me|
|00002270| 6d 6f 72 79 2e 20 20 54 | 68 65 73 65 20 61 72 65 |mory. T|hese are|
|00002280| 20 6e 6f 74 20 74 6f 20 | 62 65 20 63 6f 6e 66 75 | not to |be confu|
|00002290| 73 65 64 20 77 69 74 68 | 20 6c 6f 63 6b 69 6e 67 |sed with| locking|
|000022a0| 20 61 20 68 61 6e 64 6c | 65 2e 20 20 4c 6f 63 6b | a handl|e. Lock|
|000022b0| 69 6e 67 20 61 20 68 61 | 6e 64 6c 65 20 70 72 65 |ing a ha|ndle pre|
|000022c0| 76 65 6e 74 73 20 74 68 | 65 20 68 61 6e 64 6c 65 |vents th|e handle|
|000022d0| 20 66 72 6f 6d 20 63 68 | 61 6e 67 69 6e 67 20 69 | from ch|anging i|
|000022e0| 74 73 20 6c 6f 67 69 63 | 61 6c 20 61 64 64 72 65 |ts logic|al addre|
|000022f0| 73 73 20 64 75 72 69 6e | 67 20 4d 65 6d 6f 72 79 |ss durin|g Memory|
|00002300| 20 4d 61 6e 61 67 65 72 | 20 6f 70 65 72 61 74 69 | Manager| operati|
|00002310| 6f 6e 73 2e 20 48 6f 6c | 64 69 6e 67 20 61 6e 64 |ons. Hol|ding and|
|00002320| 20 6c 6f 63 6b 69 6e 67 | 20 76 69 72 74 75 61 6c | locking| virtual|
|00002330| 20 6d 65 6d 6f 72 79 20 | 61 66 66 65 63 74 73 20 | memory |affects |
|00002340| 68 6f 77 20 56 4d 20 64 | 65 61 6c 73 20 77 69 74 |how VM d|eals wit|
|00002350| 68 20 61 72 62 69 74 72 | 61 72 79 20 72 61 6e 67 |h arbitr|ary rang|
|00002360| 65 73 20 6f 66 20 6d 65 | 6d 6f 72 79 20 64 75 72 |es of me|mory dur|
|00002370| 69 6e 67 20 70 61 67 69 | 6e 67 20 6f 70 65 72 61 |ing pagi|ng opera|
|00002380| 74 69 6f 6e 73 2e 0d 48 | 6f 6c 64 69 6e 67 20 61 |tions..H|olding a|
|00002390| 6e 64 20 6c 6f 63 6b 69 | 6e 67 20 6d 65 6d 6f 72 |nd locki|ng memor|
|000023a0| 79 20 28 61 73 20 6f 70 | 70 6f 73 65 64 20 74 6f |y (as op|posed to|
|000023b0| 20 61 20 68 61 6e 64 6c | 65 29 20 61 72 65 20 56 | a handl|e) are V|
|000023c0| 4d 20 66 75 6e 63 74 69 | 6f 6e 73 20 65 78 63 6c |M functi|ons excl|
|000023d0| 75 73 69 76 65 6c 79 20 | 61 6e 64 20 61 72 65 20 |usively |and are |
|000023e0| 61 63 63 6f 6d 70 6c 69 | 73 68 65 64 20 77 69 74 |accompli|shed wit|
|000023f0| 68 20 66 6f 75 72 20 6e | 65 77 20 5f 4d 65 6d 6f |h four n|ew _Memo|
|00002400| 72 79 44 69 73 70 61 74 | 63 68 20 72 6f 75 74 69 |ryDispat|ch routi|
|00002410| 6e 65 73 3a 20 20 48 6f | 6c 64 4d 65 6d 6f 72 79 |nes: Ho|ldMemory|
|00002420| 20 61 6e 64 20 4c 6f 63 | 6b 4d 65 6d 6f 72 79 2c | and Loc|kMemory,|
|00002430| 20 61 6e 64 20 74 68 65 | 20 63 6f 72 72 65 73 70 | and the| corresp|
|00002440| 6f 6e 64 69 6e 67 20 72 | 6f 75 74 69 6e 65 73 20 |onding r|outines |
|00002450| 74 6f 20 75 6e 64 6f 20 | 74 68 65 73 65 20 6f 70 |to undo |these op|
|00002460| 65 72 61 74 69 6f 6e 73 | 2c 20 55 6e 68 6f 6c 64 |erations|, Unhold|
|00002470| 4d 65 6d 6f 72 79 20 61 | 6e 64 20 55 6e 6c 6f 63 |Memory a|nd Unloc|
|00002480| 6b 4d 65 6d 6f 72 79 2e | 20 20 50 61 79 20 73 70 |kMemory.| Pay sp|
|00002490| 65 63 69 61 6c 20 61 74 | 74 65 6e 74 69 6f 6e 20 |ecial at|tention |
|000024a0| 61 6e 79 20 74 69 6d 65 | 20 79 6f 75 20 68 6f 6c |any time| you hol|
|000024b0| 64 20 6f 72 20 6c 6f 63 | 6b 20 61 20 72 61 6e 67 |d or loc|k a rang|
|000024c0| 65 20 6f 66 20 6d 65 6d | 6f 72 79 20 74 68 61 74 |e of mem|ory that|
|000024d0| 20 79 6f 75 20 73 75 62 | 73 65 71 75 65 6e 74 6c | you sub|sequentl|
|000024e0| 79 20 75 6e 68 6f 6c 64 | 20 6f 72 20 75 6e 6c 6f |y unhold| or unlo|
|000024f0| 63 6b 20 74 68 65 20 73 | 61 6d 65 20 72 61 6e 67 |ck the s|ame rang|
|00002500| 65 2e 20 20 45 76 65 72 | 79 20 73 69 6e 67 6c 65 |e. Ever|y single|
|00002510| 20 63 61 6c 6c 20 74 6f | 20 48 6f 6c 64 4d 65 6d | call to| HoldMem|
|00002520| 6f 72 79 20 6f 72 20 4c | 6f 63 6b 4d 65 6d 6f 72 |ory or L|ockMemor|
|00002530| 79 20 6d 75 73 74 20 62 | 65 20 62 61 6c 61 6e 63 |y must b|e balanc|
|00002540| 65 64 20 62 79 20 61 20 | 63 6f 72 72 65 73 70 6f |ed by a |correspo|
|00002550| 6e 64 69 6e 67 20 55 6e | 68 6f 6c 64 4d 65 6d 6f |nding Un|holdMemo|
|00002560| 72 79 20 6f 72 20 55 6e | 6c 6f 63 6b 4d 65 6d 6f |ry or Un|lockMemo|
|00002570| 72 79 20 62 65 63 61 75 | 73 65 20 74 68 65 20 6f |ry becau|se the o|
|00002580| 70 65 72 61 74 69 6e 67 | 20 73 79 73 74 65 6d 20 |perating| system |
|00002590| 73 75 70 70 6f 72 74 73 | 20 6d 75 6c 74 69 70 6c |supports| multipl|
|000025a0| 65 20 6c 65 76 65 6c 73 | 20 6f 66 20 6c 6f 63 6b |e levels| of lock|
|000025b0| 69 6e 67 20 61 6e 64 20 | 68 6f 6c 64 69 6e 67 2c |ing and |holding,|
|000025c0| 20 6d 75 63 68 20 6c 69 | 6b 65 20 69 74 20 73 75 | much li|ke it su|
|000025d0| 70 70 6f 72 74 73 20 6d | 75 6c 74 69 70 6c 65 20 |pports m|ultiple |
|000025e0| 6c 65 76 65 6c 73 20 6f | 66 20 63 75 72 73 6f 72 |levels o|f cursor|
|000025f0| 20 6f 62 73 63 75 72 61 | 74 69 6f 6e 20 77 69 74 | obscura|tion wit|
|00002600| 68 20 5f 53 68 6f 77 43 | 75 72 73 6f 72 20 61 6e |h _ShowC|ursor an|
|00002610| 64 20 5f 48 69 64 65 43 | 75 72 73 6f 72 2e 0d 48 |d _HideC|ursor..H|
|00002620| 6f 6c 64 69 6e 67 20 61 | 20 72 61 6e 67 65 20 6f |olding a| range o|
|00002630| 66 20 6d 65 6d 6f 72 79 | 20 67 75 61 72 61 6e 74 |f memory| guarant|
|00002640| 65 65 73 20 74 68 61 74 | 20 74 68 65 20 64 61 74 |ees that| the dat|
|00002650| 61 20 69 6e 20 74 68 61 | 74 20 72 61 6e 67 65 20 |a in tha|t range |
|00002660| 69 73 20 61 63 74 75 61 | 6c 6c 79 20 73 6f 6d 65 |is actua|lly some|
|00002670| 77 68 65 72 65 20 69 6e | 20 70 68 79 73 69 63 61 |where in| physica|
|00002680| 6c 20 4d 61 63 69 6e 74 | 6f 73 68 20 52 41 4d 20 |l Macint|osh RAM |
|00002690| 61 6e 64 20 74 68 61 74 | 20 6e 6f 20 70 61 67 69 |and that| no pagi|
|000026a0| 6e 67 20 61 63 74 69 76 | 69 74 79 20 69 73 20 6e |ng activ|ity is n|
|000026b0| 65 63 65 73 73 61 72 79 | 20 74 6f 20 6c 6f 61 64 |ecessary| to load|
|000026c0| 20 69 74 2e 20 20 54 68 | 69 73 20 69 73 20 63 72 | it. Th|is is cr|
|000026d0| 69 74 69 63 61 6c 20 66 | 6f 72 20 74 61 73 6b 73 |itical f|or tasks|
|000026e0| 20 77 68 69 63 68 20 72 | 75 6e 20 61 74 20 69 6e | which r|un at in|
|000026f0| 74 65 72 72 75 70 74 20 | 74 69 6d 65 2c 20 73 69 |terrupt |time, si|
|00002700| 6e 63 65 20 70 61 67 69 | 6e 67 20 61 63 74 69 76 |nce pagi|ng activ|
|00002710| 69 74 79 20 73 68 6f 75 | 6c 64 20 6e 6f 74 20 62 |ity shou|ld not b|
|00002720| 65 20 69 6e 69 74 69 61 | 74 65 64 20 61 74 20 69 |e initia|ted at i|
|00002730| 6e 74 65 72 72 75 70 74 | 20 74 69 6d 65 2e 20 20 |nterrupt| time. |
|00002740| 56 4d 20 69 73 20 6e 6f | 74 20 67 75 61 72 61 6e |VM is no|t guaran|
|00002750| 74 65 65 64 20 74 6f 20 | 62 65 20 72 65 65 6e 74 |teed to |be reent|
|00002760| 72 61 6e 74 2c 20 61 6e | 64 20 62 65 63 61 75 73 |rant, an|d becaus|
|00002770| 65 20 69 6e 74 65 72 72 | 75 70 74 73 20 6d 61 79 |e interr|upts may|
|00002780| 20 6f 63 63 75 72 20 69 | 6e 20 74 68 65 20 6d 69 | occur i|n the mi|
|00002790| 64 64 6c 65 20 6f 66 20 | 70 61 67 69 6e 67 2c 20 |ddle of |paging, |
|000027a0| 61 6e 79 20 64 61 74 61 | 20 61 63 63 65 73 73 65 |any data| accesse|
|000027b0| 64 20 62 79 20 61 6e 20 | 69 6e 74 65 72 72 75 70 |d by an |interrup|
|000027c0| 74 20 68 61 6e 64 6c 65 | 72 20 73 68 6f 75 6c 64 |t handle|r should|
|000027d0| 20 72 65 73 69 64 65 20 | 69 6e 20 61 20 68 65 6c | reside |in a hel|
|000027e0| 64 20 62 6c 6f 63 6b 20 | 6f 66 20 6d 65 6d 6f 72 |d block |of memor|
|000027f0| 79 2e 20 4f 6e 6c 79 20 | 68 6f 6c 64 20 6d 65 6d |y. Only |hold mem|
|00002800| 6f 72 79 20 77 68 69 63 | 68 20 6c 65 67 69 74 69 |ory whic|h legiti|
|00002810| 6d 61 74 65 6c 79 20 6e | 65 65 64 73 20 74 6f 20 |mately n|eeds to |
|00002820| 62 65 20 68 65 6c 64 20 | 74 68 6f 75 67 68 2c 20 |be held |though, |
|00002830| 62 65 63 61 75 73 65 20 | 61 6e 79 20 6d 65 6d 6f |because |any memo|
|00002840| 72 79 20 77 68 69 63 68 | 20 69 73 20 68 65 6c 64 |ry which| is held|
|00002850| 20 62 65 63 6f 6d 65 73 | 20 69 6e 65 6c 69 67 69 | becomes| ineligi|
|00002860| 62 6c 65 20 66 6f 72 20 | 70 61 67 69 6e 67 2e 20 |ble for |paging. |
|00002870| 20 54 68 69 73 20 72 65 | 64 75 63 65 73 20 74 68 | This re|duces th|
|00002880| 65 20 73 70 61 63 65 20 | 56 4d 20 68 61 73 20 74 |e space |VM has t|
|00002890| 6f 20 77 6f 72 6b 20 77 | 69 74 68 20 61 6e 64 20 |o work w|ith and |
|000028a0| 6d 61 79 20 73 69 67 6e | 69 66 69 63 61 6e 74 6c |may sign|ificantl|
|000028b0| 79 20 69 6d 70 61 63 74 | 20 73 79 73 74 65 6d 20 |y impact| system |
|000028c0| 70 65 72 66 6f 72 6d 61 | 6e 63 65 2e 20 20 53 6f |performa|nce. So|
|000028d0| 6d 65 20 69 6e 74 65 72 | 72 75 70 74 2d 74 69 6d |me inter|rupt-tim|
|000028e0| 65 20 74 61 73 6b 73 20 | 61 72 65 20 64 65 66 65 |e tasks |are defe|
|000028f0| 72 72 65 64 20 62 79 20 | 56 4d 20 75 6e 74 69 6c |rred by |VM until|
|00002900| 20 70 61 67 69 6e 67 20 | 69 73 20 73 61 66 65 2c | paging |is safe,|
|00002910| 20 73 6f 20 6d 65 6d 6f | 72 79 20 74 68 65 79 20 | so memo|ry they |
|00002920| 74 6f 75 63 68 20 64 6f | 65 73 20 6e 6f 74 20 61 |touch do|es not a|
|00002930| 6c 77 61 79 73 20 68 61 | 76 65 20 74 6f 20 62 65 |lways ha|ve to be|
|00002940| 20 68 65 6c 64 2e 20 20 | 54 68 65 73 65 20 74 61 | held. |These ta|
|00002950| 73 6b 73 20 61 72 65 20 | 63 61 6c 6c 65 64 20 6f |sks are |called o|
|00002960| 75 74 20 62 65 6c 6f 77 | 2c 20 69 6e 20 74 68 65 |ut below|, in the|
|00002970| 20 73 65 63 74 69 6f 6e | 20 d2 43 6f 6d 70 61 74 | section| .Compat|
|00002980| 69 62 69 6c 69 74 79 20 | 57 69 74 68 20 4f 74 68 |ibility |With Oth|
|00002990| 65 72 20 44 65 76 69 63 | 65 20 44 72 69 76 65 72 |er Devic|e Driver|
|000029a0| 73 20 61 6e 64 20 49 6e | 74 65 72 72 75 70 74 2d |s and In|terrupt-|
|000029b0| 4c 65 76 65 6c 20 43 6f | 64 65 2e d3 0d 4c 6f 63 |Level Co|de...Loc|
|000029c0| 6b 69 6e 67 20 61 20 72 | 61 6e 67 65 20 6f 66 20 |king a r|ange of |
|000029d0| 6d 65 6d 6f 72 79 20 69 | 73 20 6d 6f 72 65 20 73 |memory i|s more s|
|000029e0| 65 76 65 72 65 20 74 68 | 61 6e 20 68 6f 6c 64 69 |evere th|an holdi|
|000029f0| 6e 67 20 69 74 2e 20 20 | 54 68 69 73 20 6e 6f 74 |ng it. |This not|
|00002a00| 20 6f 6e 6c 79 20 66 6f | 72 63 65 73 20 74 68 65 | only fo|rces the|
|00002a10| 20 72 61 6e 67 65 20 74 | 6f 20 62 65 20 68 65 6c | range t|o be hel|
|00002a20| 64 20 72 65 73 69 64 65 | 6e 74 20 69 6e 20 70 68 |d reside|nt in ph|
|00002a30| 79 73 69 63 61 6c 20 52 | 41 4d 2c 20 62 75 74 20 |ysical R|AM, but |
|00002a40| 61 6c 73 6f 20 70 72 65 | 76 65 6e 74 73 20 69 74 |also pre|vents it|
|00002a50| 73 20 6c 6f 67 69 63 61 | 6c 20 61 64 64 72 65 73 |s logica|l addres|
|00002a60| 73 20 66 72 6f 6d 20 6d | 6f 76 69 6e 67 20 77 69 |s from m|oving wi|
|00002a70| 74 68 20 72 65 73 70 65 | 63 74 20 74 6f 20 69 74 |th respe|ct to it|
|00002a80| 73 20 70 68 79 73 69 63 | 61 6c 20 61 64 64 72 65 |s physic|al addre|
|00002a90| 73 73 2e 20 20 54 68 69 | 73 20 69 73 20 69 6d 70 |ss. Thi|s is imp|
|00002aa0| 6f 72 74 61 6e 74 20 66 | 6f 72 20 64 72 69 76 65 |ortant f|or drive|
|00002ab0| 72 73 20 77 68 69 63 68 | 20 69 6e 69 74 69 61 74 |rs which| initiat|
|00002ac0| 65 20 44 4d 41 20 74 72 | 61 6e 73 61 63 74 69 6f |e DMA tr|ansactio|
|00002ad0| 6e 73 2c 20 62 65 63 61 | 75 73 65 20 74 68 65 72 |ns, beca|use ther|
|00002ae0| 65 20 6d 75 73 74 20 62 | 65 20 61 20 6b 6e 6f 77 |e must b|e a know|
|00002af0| 6e 2c 20 73 74 61 74 69 | 63 20 72 65 6c 61 74 69 |n, stati|c relati|
|00002b00| 6f 6e 73 68 69 70 20 62 | 65 74 77 65 65 6e 20 6c |onship b|etween l|
|00002b10| 6f 67 69 63 61 6c 20 61 | 6e 64 20 70 68 79 73 69 |ogical a|nd physi|
|00002b20| 63 61 6c 20 61 64 64 72 | 65 73 73 65 73 20 66 6f |cal addr|esses fo|
|00002b30| 72 20 74 68 65 20 64 75 | 72 61 74 69 6f 6e 20 6f |r the du|ration o|
|00002b40| 66 20 73 75 63 68 20 61 | 6e 20 6f 70 65 72 61 74 |f such a|n operat|
|00002b50| 69 6f 6e 2e 20 20 50 61 | 72 74 20 6f 66 20 74 68 |ion. Pa|rt of th|
|00002b60| 65 20 62 65 68 61 76 69 | 6f 72 20 6f 66 20 4c 6f |e behavi|or of Lo|
|00002b70| 63 6b 4d 65 6d 6f 72 79 | 20 69 73 20 74 6f 20 6d |ckMemory| is to m|
|00002b80| 61 6b 65 20 74 68 65 20 | 61 73 73 6f 63 69 61 74 |ake the |associat|
|00002b90| 65 64 20 6d 65 6d 6f 72 | 79 20 6e 6f 6e 2d 63 61 |ed memor|y non-ca|
|00002ba0| 63 68 61 62 6c 65 20 77 | 68 69 63 68 20 69 73 20 |chable w|hich is |
|00002bb0| 69 6d 70 6f 72 74 61 6e | 74 20 66 6f 72 20 44 4d |importan|t for DM|
|00002bc0| 41 20 74 72 61 6e 73 66 | 65 72 73 2e 0d 57 61 72 |A transf|ers..War|
|00002bd0| 6e 69 6e 67 3a 09 41 70 | 70 6c 65 20 63 61 6e 6e |ning:.Ap|ple cann|
|00002be0| 6f 74 20 6d 61 6b 65 20 | 74 68 65 20 70 6f 69 6e |ot make |the poin|
|00002bf0| 74 20 74 6f 6f 20 73 74 | 72 6f 6e 67 6c 79 20 74 |t too st|rongly t|
|00002c00| 68 61 74 20 6d 65 6d 6f | 72 79 20 73 68 6f 75 6c |hat memo|ry shoul|
|00002c10| 64 20 6f 6e 6c 79 20 62 | 65 20 68 65 6c 64 20 6f |d only b|e held o|
|00002c20| 72 20 6c 6f 63 6b 65 64 | 20 77 68 65 6e 20 61 62 |r locked| when ab|
|00002c30| 73 6f 6c 75 74 65 6c 79 | 20 6e 65 63 65 73 73 61 |solutely| necessa|
|00002c40| 72 79 2c 20 61 6e 64 20 | 6f 6e 6c 79 20 61 73 20 |ry, and |only as |
|00002c50| 6c 6f 6e 67 20 61 73 20 | 6e 65 63 65 73 73 61 72 |long as |necessar|
|00002c60| 79 2e 20 20 49 74 20 69 | 73 20 77 6f 72 74 68 20 |y. It i|s worth |
|00002c70| 72 65 73 74 61 74 69 6e | 67 20 74 68 61 74 20 74 |restatin|g that t|
|00002c80| 68 65 20 69 6d 70 61 63 | 74 20 6f 6e 20 70 65 72 |he impac|t on per|
|00002c90| 66 6f 72 6d 61 6e 63 65 | 20 63 61 6e 20 62 65 20 |formance| can be |
|00002ca0| 73 69 67 6e 69 66 69 63 | 61 6e 74 20 6f 72 20 65 |signific|ant or e|
|00002cb0| 76 65 6e 20 66 61 74 61 | 6c 20 69 6e 20 73 65 76 |ven fata|l in sev|
|00002cc0| 65 72 65 20 63 61 73 65 | 73 2e 20 20 49 74 20 69 |ere case|s. It i|
|00002cd0| 73 20 61 20 63 72 69 6d | 65 20 61 67 61 69 6e 73 |s a crim|e agains|
|00002ce0| 74 20 74 68 65 20 6d 61 | 63 68 69 6e 65 20 74 6f |t the ma|chine to|
|00002cf0| 20 68 6f 6c 64 20 6f 72 | 20 6c 6f 63 6b 20 6d 65 | hold or| lock me|
|00002d00| 6d 6f 72 79 20 75 6e 6e | 65 63 65 73 73 61 72 69 |mory unn|ecessari|
|00002d10| 6c 79 2e 20 20 46 61 69 | 6c 75 72 65 20 74 6f 20 |ly. Fai|lure to |
|00002d20| 75 6e 68 6f 6c 64 20 6f | 72 20 75 6e 6c 6f 63 6b |unhold o|r unlock|
|00002d30| 20 6d 65 6d 6f 72 79 20 | 70 72 65 76 69 6f 75 73 | memory |previous|
|00002d40| 6c 79 20 68 65 6c 64 20 | 6f 72 20 6c 6f 63 6b 65 |ly held |or locke|
|00002d50| 64 20 69 73 20 6d 6f 73 | 74 20 68 65 69 6e 6f 75 |d is mos|t heinou|
|00002d60| 73 2e 0d 49 6e 20 6e 6f | 6e 2d 56 4d 20 65 6e 76 |s..In no|n-VM env|
|00002d70| 69 72 6f 6e 6d 65 6e 74 | 73 2c 20 74 68 65 72 65 |ironment|s, there|
|00002d80| 20 69 73 20 6e 6f 20 70 | 61 67 65 20 73 77 61 70 | is no p|age swap|
|00002d90| 70 69 6e 67 20 61 63 74 | 69 76 69 74 79 2e 20 20 |ping act|ivity. |
|00002da0| 54 68 69 73 20 69 73 20 | 73 69 6d 69 6c 61 72 20 |This is |similar |
|00002db0| 74 6f 20 61 6c 6c 20 6f | 66 20 6d 65 6d 6f 72 79 |to all o|f memory|
|00002dc0| 20 62 65 69 6e 67 20 6c | 6f 63 6b 65 64 2c 20 65 | being l|ocked, e|
|00002dd0| 78 63 65 70 74 20 74 68 | 61 74 20 63 61 63 68 69 |xcept th|at cachi|
|00002de0| 6e 67 20 69 73 20 73 74 | 69 6c 6c 20 65 6e 61 62 |ng is st|ill enab|
|00002df0| 6c 65 64 2e 20 20 54 72 | 75 6c 79 20 6c 6f 63 6b |led. Tr|uly lock|
|00002e00| 65 64 20 6d 65 6d 6f 72 | 79 20 69 73 20 6e 65 69 |ed memor|y is nei|
|00002e10| 74 68 65 72 20 63 61 63 | 68 65 64 20 6e 6f 72 20 |ther cac|hed nor |
|00002e20| 70 61 67 65 64 2e 20 20 | 49 66 20 79 6f 75 20 61 |paged. |If you a|
|00002e30| 72 65 20 72 75 6e 6e 69 | 6e 67 20 53 79 73 74 65 |re runni|ng Syste|
|00002e40| 6d 20 53 6f 66 74 77 61 | 72 65 20 37 2e 30 20 77 |m Softwa|re 7.0 w|
|00002e50| 69 74 68 20 56 4d 2c 20 | 79 6f 75 20 6d 75 73 74 |ith VM, |you must|
|00002e60| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 6c 6f 63 6b | explici|tly lock|
|00002e70| 20 61 20 72 61 6e 67 65 | 20 6f 66 20 6d 65 6d 6f | a range| of memo|
|00002e80| 72 79 20 77 69 74 68 20 | 4c 6f 63 6b 4d 65 6d 6f |ry with |LockMemo|
|00002e90| 72 79 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |ry befor|e callin|
|00002ea0| 67 20 47 65 74 50 68 79 | 73 69 63 61 6c 2e 20 20 |g GetPhy|sical. |
|00002eb0| 59 6f 75 20 6d 61 79 20 | 6f 6e 6c 79 20 63 61 6c |You may |only cal|
|00002ec0| 6c 20 47 65 74 50 68 79 | 73 69 63 61 6c 20 6f 6e |l GetPhy|sical on|
|00002ed0| 20 61 20 6c 6f 63 6b 65 | 64 20 62 6c 6f 63 6b 20 | a locke|d block |
|00002ee0| 6f 66 20 76 69 72 74 75 | 61 6c 20 6d 65 6d 6f 72 |of virtu|al memor|
|00002ef0| 79 2c 20 6f 72 20 79 6f | 75 20 67 65 74 20 61 6e |y, or yo|u get an|
|00002f00| 20 65 72 72 6f 72 2c 20 | 73 69 6e 63 65 2c 20 61 | error, |since, a|
|00002f10| 6d 6f 6e 67 20 6f 74 68 | 65 72 20 72 65 61 73 6f |mong oth|er reaso|
|00002f20| 6e 73 2c 20 61 6e 79 20 | 70 61 67 69 6e 67 20 61 |ns, any |paging a|
|00002f30| 63 74 69 76 69 74 79 20 | 63 6f 75 6c 64 20 69 6e |ctivity |could in|
|00002f40| 76 61 6c 69 64 61 74 65 | 20 74 68 65 20 72 65 73 |validate| the res|
|00002f50| 75 6c 74 73 20 6f 66 20 | 61 20 47 65 74 50 68 79 |ults of |a GetPhy|
|00002f60| 73 69 63 61 6c 20 63 61 | 6c 6c 2e 20 20 41 6c 74 |sical ca|ll. Alt|
|00002f70| 68 6f 75 67 68 20 69 74 | 20 69 73 20 6e 6f 74 20 |hough it| is not |
|00002f80| 6e 65 63 65 73 73 61 72 | 79 20 74 6f 20 63 61 6c |necessar|y to cal|
|00002f90| 6c 20 4c 6f 63 6b 4d 65 | 6d 6f 72 79 20 62 65 66 |l LockMe|mory bef|
|00002fa0| 6f 72 65 20 47 65 74 50 | 68 79 73 69 63 61 6c 20 |ore GetP|hysical |
|00002fb0| 69 66 20 56 4d 20 69 73 | 20 6e 6f 74 20 72 75 6e |if VM is| not run|
|00002fc0| 6e 69 6e 67 2c 20 4c 6f | 63 6b 4d 65 6d 6f 72 79 |ning, Lo|ckMemory|
|00002fd0| 20 6d 61 79 20 73 74 69 | 6c 6c 20 62 65 20 75 73 | may sti|ll be us|
|00002fe0| 65 64 20 66 6f 72 20 69 | 74 73 20 66 61 76 6f 72 |ed for i|ts favor|
|00002ff0| 61 62 6c 65 20 65 66 66 | 65 63 74 20 6f 66 20 64 |able eff|ect of d|
|00003000| 69 73 61 62 6c 69 6e 67 | 20 63 61 63 68 69 6e 67 |isabling| caching|
|00003010| 2e 20 20 54 68 69 73 20 | 4e 6f 74 65 20 69 6e 63 |. This |Note inc|
|00003020| 6c 75 64 65 73 20 61 20 | 63 6f 64 65 20 74 65 6d |ludes a |code tem|
|00003030| 70 6c 61 74 65 20 28 6c | 6f 63 61 74 65 64 20 61 |plate (l|ocated a|
|00003040| 74 20 74 68 65 20 65 6e | 64 29 20 77 68 69 63 68 |t the en|d) which|
|00003050| 20 69 6c 6c 75 73 74 72 | 61 74 65 73 20 61 20 d2 | illustr|ates a .|
|00003060| 77 61 79 20 72 61 64 d3 | 20 6d 65 74 68 6f 64 20 |way rad.| method |
|00003070| 74 6f 20 69 6d 70 6c 65 | 6d 65 6e 74 20 64 72 69 |to imple|ment dri|
|00003080| 76 65 72 20 63 61 6c 6c | 73 20 74 6f 20 61 20 67 |ver call|s to a g|
|00003090| 65 6e 65 72 69 63 20 4e | 75 42 75 73 20 6d 61 73 |eneric N|uBus mas|
|000030a0| 74 65 72 20 63 61 72 64 | 2e 20 20 49 74 20 64 6f |ter card|. It do|
|000030b0| 65 73 6e d5 74 20 65 76 | 65 6e 20 68 61 76 65 20 |esn.t ev|en have |
|000030c0| 74 6f 20 6b 6e 6f 77 20 | 69 66 20 56 4d 20 69 73 |to know |if VM is|
|000030d0| 20 72 75 6e 6e 69 6e 67 | 2e 20 20 48 61 72 64 77 | running|. Hardw|
|000030e0| 61 72 65 20 61 6e 64 20 | 64 72 69 76 65 72 73 20 |are and |drivers |
|000030f0| 73 68 6f 75 6c 64 20 62 | 65 20 64 65 73 69 67 6e |should b|e design|
|00003100| 65 64 20 74 6f 20 73 75 | 70 70 6f 72 74 20 74 68 |ed to su|pport th|
|00003110| 69 73 20 6d 65 74 68 6f | 64 20 66 6f 72 20 6d 61 |is metho|d for ma|
|00003120| 78 69 6d 75 6d 20 56 4d | 20 66 72 69 65 6e 64 6c |ximum VM| friendl|
|00003130| 69 6e 65 73 73 2e 0d 54 | 68 65 72 65 20 69 73 20 |iness..T|here is |
|00003140| 6f 6e 65 20 6d 6f 72 65 | 20 56 4d 20 72 6f 75 74 |one more| VM rout|
|00003150| 69 6e 65 20 6f 66 20 69 | 6e 74 65 72 65 73 74 2c |ine of i|nterest,|
|00003160| 20 4c 6f 63 6b 4d 65 6d | 6f 72 79 43 6f 6e 74 69 | LockMem|oryConti|
|00003170| 67 75 6f 75 73 2c 20 77 | 68 69 63 68 20 69 73 20 |guous, w|hich is |
|00003180| 70 72 6f 76 69 64 65 64 | 20 74 6f 20 61 73 73 69 |provided| to assi|
|00003190| 73 74 20 64 65 76 65 6c | 6f 70 65 72 73 20 77 68 |st devel|opers wh|
|000031a0| 6f 73 65 20 44 4d 41 20 | 68 61 72 64 77 61 72 65 |ose DMA |hardware|
|000031b0| 20 69 73 20 6e 6f 74 20 | 63 61 70 61 62 6c 65 20 | is not |capable |
|000031c0| 6f 66 20 74 72 61 6e 73 | 66 65 72 72 69 6e 67 20 |of trans|ferring |
|000031d0| 62 6c 6f 63 6b 73 20 6f | 66 20 61 72 62 69 74 72 |blocks o|f arbitr|
|000031e0| 61 72 79 20 73 69 7a 65 | 20 6f 72 20 66 6f 72 20 |ary size| or for |
|000031f0| 73 6f 6d 65 20 6f 74 68 | 65 72 20 72 65 61 73 6f |some oth|er reaso|
|00003200| 6e 20 63 61 6e 6e 6f 74 | 20 75 73 65 20 61 20 67 |n cannot| use a g|
|00003210| 65 6e 65 72 61 6c 69 7a | 65 64 20 61 6c 67 6f 72 |eneraliz|ed algor|
|00003220| 69 74 68 6d 20 73 75 63 | 68 20 61 73 20 74 68 65 |ithm suc|h as the|
|00003230| 20 6f 6e 65 20 70 72 6f | 76 69 64 65 64 2e 20 20 | one pro|vided. |
|00003240| 41 70 70 6c 65 20 63 61 | 6e 20 6f 6e 6c 79 20 77 |Apple ca|n only w|
|00003250| 61 72 6e 20 64 65 76 65 | 6c 6f 70 65 72 73 20 74 |arn deve|lopers t|
|00003260| 68 61 74 20 4c 6f 63 6b | 4d 65 6d 6f 72 79 43 6f |hat Lock|MemoryCo|
|00003270| 6e 74 69 67 75 6f 75 73 | 20 69 73 20 70 6f 74 65 |ntiguous| is pote|
|00003280| 6e 74 69 61 6c 6c 79 20 | 61 6e 20 65 78 70 65 6e |ntially |an expen|
|00003290| 73 69 76 65 20 6f 70 65 | 72 61 74 69 6f 6e 20 69 |sive ope|ration i|
|000032a0| 6e 20 74 65 72 6d 73 20 | 6f 66 20 70 65 72 66 6f |n terms |of perfo|
|000032b0| 72 6d 61 6e 63 65 20 61 | 6e 64 20 69 73 20 6f 6e |rmance a|nd is on|
|000032c0| 65 20 76 65 72 79 20 6c | 69 6b 65 6c 79 20 74 6f |e very l|ikely to|
|000032d0| 20 66 61 69 6c 20 73 69 | 6e 63 65 20 63 6f 6e 74 | fail si|nce cont|
|000032e0| 69 67 75 6f 75 73 20 70 | 68 79 73 69 63 61 6c 20 |iguous p|hysical |
|000032f0| 6d 65 6d 6f 72 79 20 6d | 61 79 20 62 65 20 64 69 |memory m|ay be di|
|00003300| 66 66 69 63 75 6c 74 2c | 20 69 66 20 6e 6f 74 20 |fficult,| if not |
|00003310| 69 6d 70 6f 73 73 69 62 | 6c 65 2c 20 74 6f 20 66 |impossib|le, to f|
|00003320| 69 6e 64 2e 20 20 4c 6f | 63 6b 4d 65 6d 6f 72 79 |ind. Lo|ckMemory|
|00003330| 43 6f 6e 74 69 67 75 6f | 75 73 20 69 73 20 6e 6f |Contiguo|us is no|
|00003340| 74 20 70 61 72 74 69 63 | 75 6c 61 72 6c 79 20 75 |t partic|ularly u|
|00003350| 73 65 66 75 6c 2c 20 75 | 6e 6c 65 73 73 20 56 4d |seful, u|nless VM|
|00003360| 20 69 73 20 72 75 6e 6e | 69 6e 67 2c 20 73 68 6f | is runn|ing, sho|
|00003370| 75 6c 64 20 61 20 72 61 | 6e 67 65 20 6f 66 20 6d |uld a ra|nge of m|
|00003380| 65 6d 6f 72 79 20 68 61 | 70 70 65 6e 20 74 6f 20 |emory ha|ppen to |
|00003390| 63 72 6f 73 73 20 61 20 | 70 68 79 73 69 63 61 6c |cross a |physical|
|000033a0| 20 64 69 73 63 6f 6e 74 | 69 6e 75 69 74 79 20 6c | discont|inuity l|
|000033b0| 69 6b 65 20 74 68 61 74 | 20 66 6f 75 6e 64 20 6f |ike that| found o|
|000033c0| 6e 20 61 20 4d 61 63 69 | 6e 74 6f 73 68 20 49 49 |n a Maci|ntosh II|
|000033d0| 63 69 2e 20 20 4e 6f 20 | 68 61 72 64 77 61 72 65 |ci. No |hardware|
|000033e0| 20 6f 72 20 73 6f 66 74 | 77 61 72 65 20 70 72 6f | or soft|ware pro|
|000033f0| 64 75 63 74 20 73 68 6f | 75 6c 64 20 72 65 71 75 |duct sho|uld requ|
|00003400| 69 72 65 20 56 4d 20 69 | 6e 20 6f 72 64 65 72 20 |ire VM i|n order |
|00003410| 74 6f 20 72 75 6e 2e 20 | 20 4c 6f 63 6b 4d 65 6d |to run. | LockMem|
|00003420| 6f 72 79 43 6f 6e 74 69 | 67 75 6f 75 73 20 6d 69 |oryConti|guous mi|
|00003430| 67 68 74 20 62 65 20 75 | 73 65 66 75 6c 20 66 6f |ght be u|seful fo|
|00003440| 72 20 64 65 74 65 72 6d | 69 6e 69 6e 67 20 77 68 |r determ|ining wh|
|00003450| 65 74 68 65 72 20 61 20 | 72 61 6e 67 65 20 6f 66 |ether a |range of|
|00003460| 20 6c 6f 67 69 63 61 6c | 20 6d 65 6d 6f 72 79 20 | logical| memory |
|00003470| 69 73 20 61 63 74 75 61 | 6c 6c 79 20 70 68 79 73 |is actua|lly phys|
|00003480| 69 63 61 6c 6c 79 20 63 | 6f 6e 74 69 67 75 6f 75 |ically c|ontiguou|
|00003490| 73 2c 20 61 6c 74 68 6f | 75 67 68 20 47 65 74 50 |s, altho|ugh GetP|
|000034a0| 68 79 73 69 63 61 6c 20 | 63 61 6e 20 64 6f 20 74 |hysical |can do t|
|000034b0| 68 65 20 73 61 6d 65 20 | 74 68 69 6e 67 20 77 69 |he same |thing wi|
|000034c0| 74 68 6f 75 74 20 61 63 | 74 75 61 6c 6c 79 20 6c |thout ac|tually l|
|000034d0| 6f 63 6b 69 6e 67 20 74 | 68 65 20 6d 65 6d 6f 72 |ocking t|he memor|
|000034e0| 79 2e 0d 41 70 70 6c 65 | d5 73 20 70 72 69 6d 61 |y..Apple|.s prima|
|000034f0| 72 79 20 72 65 63 6f 6d | 6d 65 6e 64 61 74 69 6f |ry recom|mendatio|
|00003500| 6e 20 72 65 67 61 72 64 | 69 6e 67 20 4c 6f 63 6b |n regard|ing Lock|
|00003510| 4d 65 6d 6f 72 79 43 6f | 6e 74 69 67 75 6f 75 73 |MemoryCo|ntiguous|
|00003520| 20 69 73 20 74 6f 20 61 | 76 6f 69 64 20 69 74 73 | is to a|void its|
|00003530| 20 75 73 65 20 69 66 20 | 61 74 20 61 6c 6c 20 70 | use if |at all p|
|00003540| 6f 73 73 69 62 6c 65 2e | 20 20 49 66 20 79 6f 75 |ossible.| If you|
|00003550| 20 6d 75 73 74 20 75 73 | 65 20 4c 6f 63 6b 4d 65 | must us|e LockMe|
|00003560| 6d 6f 72 79 43 6f 6e 74 | 69 67 75 6f 75 73 2c 20 |moryCont|iguous, |
|00003570| 41 70 70 6c 65 20 72 65 | 63 6f 6d 6d 65 6e 64 73 |Apple re|commends|
|00003580| 20 74 68 61 74 20 79 6f | 75 20 61 6c 6c 6f 63 61 | that yo|u alloca|
|00003590| 74 65 20 79 6f 75 72 20 | 62 75 66 66 65 72 20 61 |te your |buffer a|
|000035a0| 73 20 65 61 72 6c 79 20 | 61 73 20 70 6f 73 73 69 |s early |as possi|
|000035b0| 62 6c 65 20 28 70 72 65 | 66 65 72 61 62 6c 79 20 |ble (pre|ferably |
|000035c0| 61 74 20 73 74 61 72 74 | 75 70 29 20 61 6e 64 20 |at start|up) and |
|000035d0| 6c 6f 63 6b 20 69 74 20 | 64 6f 77 6e 20 63 6f 6e |lock it |down con|
|000035e0| 74 69 67 75 6f 75 73 6c | 79 20 61 74 20 74 68 61 |tiguousl|y at tha|
|000035f0| 74 20 74 69 6d 65 2e 20 | 20 56 4d 20 69 73 20 61 |t time. | VM is a|
|00003600| 6e 20 65 6e 74 72 6f 70 | 69 63 20 73 79 73 74 65 |n entrop|ic syste|
|00003610| 6d 2c 20 6d 65 61 6e 69 | 6e 67 20 69 74 73 20 70 |m, meani|ng its p|
|00003620| 61 67 65 73 20 74 65 6e | 64 20 74 6f 20 62 65 63 |ages ten|d to bec|
|00003630| 6f 6d 65 20 73 68 75 66 | 66 6c 65 64 20 6f 76 65 |ome shuf|fled ove|
|00003640| 72 20 74 69 6d 65 2c 20 | 73 6f 20 69 74 d5 73 20 |r time, |so it.s |
|00003650| 65 61 73 69 65 73 74 20 | 74 6f 20 66 69 6e 64 20 |easiest |to find |
|00003660| 63 6f 6e 74 69 67 75 6f | 75 73 20 6d 65 6d 6f 72 |contiguo|us memor|
|00003670| 79 20 65 61 72 6c 79 20 | 69 6e 20 61 20 73 65 73 |y early |in a ses|
|00003680| 73 69 6f 6e 2e 0d 57 68 | 65 6e 20 74 6f 20 43 61 |sion..Wh|en to Ca|
|00003690| 6c 6c 3f 0d 48 6f 6c 64 | 4d 65 6d 6f 72 79 0d a5 |ll?.Hold|Memory..|
|000036a0| 09 42 65 66 6f 72 65 20 | 74 61 6b 69 6e 67 20 63 |.Before |taking c|
|000036b0| 6f 6e 74 72 6f 6c 20 6f | 66 20 74 68 65 20 53 43 |ontrol o|f the SC|
|000036c0| 53 49 20 62 75 73 2e 0d | a5 09 42 65 66 6f 72 65 |SI bus..|..Before|
|000036d0| 20 61 63 63 65 73 73 69 | 6e 67 20 6d 65 6d 6f 72 | accessi|ng memor|
|000036e0| 79 20 61 74 20 69 6e 74 | 65 72 72 75 70 74 20 74 |y at int|errupt t|
|000036f0| 69 6d 65 2e 0d a5 09 54 | 6f 20 6b 65 65 70 20 63 |ime....T|o keep c|
|00003700| 72 69 74 69 63 61 6c 20 | 72 61 6e 67 65 73 20 6f |ritical |ranges o|
|00003710| 66 20 6d 65 6d 6f 72 79 | 20 72 65 73 69 64 65 6e |f memory| residen|
|00003720| 74 20 66 6f 72 20 70 65 | 72 66 6f 72 6d 61 6e 63 |t for pe|rformanc|
|00003730| 65 20 72 65 61 73 6f 6e | 73 2e 0d 4c 6f 63 6b 4d |e reason|s..LockM|
|00003740| 65 6d 6f 72 79 0d a5 60 | 09 52 61 72 65 6c 79 2e |emory..`|.Rarely.|
|00003750| 20 20 28 41 6c 77 61 79 | 73 20 55 6e 6c 6f 63 6b | (Alway|s Unlock|
|00003760| 4d 65 6d 6f 72 79 20 61 | 73 20 73 6f 6f 6e 20 61 |Memory a|s soon a|
|00003770| 73 20 70 6f 73 73 69 62 | 6c 65 2e 29 0d a5 09 42 |s possib|le.)...B|
|00003780| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 47 65 |efore ca|lling Ge|
|00003790| 74 50 68 79 73 69 63 61 | 6c 2e 0d a5 09 42 65 66 |tPhysica|l....Bef|
|000037a0| 6f 72 65 20 69 6e 69 74 | 69 61 74 69 6e 67 20 61 |ore init|iating a|
|000037b0| 20 44 4d 41 20 74 72 61 | 6e 73 66 65 72 2e 0d 4c | DMA tra|nsfer..L|
|000037c0| 6f 63 6b 4d 65 6d 6f 72 | 79 43 6f 6e 74 69 67 75 |ockMemor|yContigu|
|000037d0| 6f 75 73 0d a5 20 20 4e | 65 76 65 72 2c 20 69 66 |ous.. N|ever, if|
|000037e0| 20 79 6f 75 20 63 61 6e | 20 68 65 6c 70 20 69 74 | you can| help it|
|000037f0| 2e 20 20 28 49 66 20 6e | 65 63 65 73 73 61 72 79 |. (If n|ecessary|
|00003800| 2c 20 64 6f 20 73 6f 20 | 61 73 20 65 61 72 6c 79 |, do so |as early|
|00003810| 20 61 73 20 70 6f 73 73 | 69 62 6c 65 d1 73 65 65 | as poss|ible.see|
|00003820| 20 74 65 78 74 20 61 62 | 6f 76 65 29 2e 0d 57 68 | text ab|ove)..Wh|
|00003830| 65 6e 20 4e 6f 74 20 74 | 6f 20 43 61 6c 6c 3f 0d |en Not t|o Call?.|
|00003840| 48 6f 6c 64 4d 65 6d 6f | 72 79 0d a5 09 54 6f 20 |HoldMemo|ry...To |
|00003850| 6b 65 65 70 20 6c 61 72 | 67 65 20 72 61 6e 67 65 |keep lar|ge range|
|00003860| 73 20 6f 66 20 6d 65 6d | 6f 72 79 20 72 65 73 69 |s of mem|ory resi|
|00003870| 64 65 6e 74 20 66 6f 72 | 20 70 65 72 66 6f 72 6d |dent for| perform|
|00003880| 61 6e 63 65 20 72 65 61 | 73 6f 6e 73 2e 0d 4c 6f |ance rea|sons..Lo|
|00003890| 63 6b 4d 65 6d 6f 72 79 | 0d a5 09 42 65 66 6f 72 |ckMemory|...Befor|
|000038a0| 65 20 64 65 72 65 66 65 | 72 65 6e 63 69 6e 67 20 |e derefe|rencing |
|000038b0| 61 20 68 61 6e 64 6c 65 | 2e 20 20 28 4c 6f 63 6b |a handle|. (Lock|
|000038c0| 4d 65 6d 6f 72 79 20 73 | 68 6f 75 6c 64 20 6e 6f |Memory s|hould no|
|000038d0| 74 20 62 65 20 63 6f 6e | 66 75 73 65 64 20 77 69 |t be con|fused wi|
|000038e0| 74 68 20 5f 48 4c 6f 63 | 6b 2e 29 0d a5 09 57 68 |th _HLoc|k.)...Wh|
|000038f0| 65 6e 20 79 6f 75 20 72 | 65 61 6c 6c 79 20 6d 65 |en you r|eally me|
|00003900| 61 6e 20 48 6f 6c 64 4d | 65 6d 6f 72 79 2e 0d 57 |an HoldM|emory..W|
|00003910| 68 61 74 20 46 6f 72 6d | 20 4f 66 20 41 64 64 72 |hat Form| Of Addr|
|00003920| 65 73 73 20 54 6f 20 50 | 61 73 73 3f 0d 41 6c 6c |ess To P|ass?.All|
|00003930| 20 5f 4d 65 6d 6f 72 79 | 44 69 73 70 61 74 63 68 | _Memory|Dispatch|
|00003940| 20 72 6f 75 74 69 6e 65 | 73 20 64 65 73 63 72 69 | routine|s descri|
|00003950| 62 65 64 20 61 62 6f 76 | 65 20 77 6f 72 6b 20 61 |bed abov|e work a|
|00003960| 73 20 65 78 70 65 63 74 | 65 64 20 69 6e 20 65 69 |s expect|ed in ei|
|00003970| 74 68 65 72 20 32 34 2d | 62 69 74 20 6d 6f 64 65 |ther 24-|bit mode|
|00003980| 20 6f 72 20 33 32 2d 62 | 69 74 20 6d 6f 64 65 2e | or 32-b|it mode.|
|00003990| 20 20 49 6e 20 32 34 2d | 62 69 74 20 6d 6f 64 65 | In 24-|bit mode|
|000039a0| 2c 20 66 6f 72 20 69 6e | 73 74 61 6e 63 65 2c 20 |, for in|stance, |
|000039b0| 6d 61 73 74 65 72 20 70 | 6f 69 6e 74 65 72 20 66 |master p|ointer f|
|000039c0| 6c 61 67 73 20 6f 72 20 | 6f 74 68 65 72 20 67 61 |lags or |other ga|
|000039d0| 72 62 61 67 65 20 62 69 | 74 73 20 69 6e 20 74 68 |rbage bi|ts in th|
|000039e0| 65 20 68 69 67 68 2d 6f | 72 64 65 72 20 65 69 67 |e high-o|rder eig|
|000039f0| 68 74 20 62 69 74 73 20 | 61 72 65 20 69 67 6e 6f |ht bits |are igno|
|00003a00| 72 65 64 20 61 6e 64 20 | 74 61 6b 65 6e 20 74 6f |red and |taken to|
|00003a10| 20 62 65 20 7a 65 72 6f | 2e 20 20 57 68 65 6e 20 | be zero|. When |
|00003a20| 73 77 69 74 63 68 69 6e | 67 20 62 65 74 77 65 65 |switchin|g betwee|
|00003a30| 6e 20 32 34 2d 62 69 74 | 20 61 6e 64 20 33 32 2d |n 24-bit| and 32-|
|00003a40| 62 69 74 20 6d 6f 64 65 | 73 2c 20 72 65 6d 65 6d |bit mode|s, remem|
|00003a50| 62 65 72 20 74 6f 20 75 | 73 65 20 5f 53 74 72 69 |ber to u|se _Stri|
|00003a60| 70 41 64 64 72 65 73 73 | 20 61 73 20 6f 75 74 6c |pAddress| as outl|
|00003a70| 69 6e 65 64 20 69 6e 20 | 54 65 63 68 6e 69 63 61 |ined in |Technica|
|00003a80| 6c 20 4e 6f 74 65 20 23 | 32 31 33 2c 20 5f 53 74 |l Note #|213, _St|
|00003a90| 72 69 70 41 64 64 72 65 | 73 73 3a 20 20 54 68 65 |ripAddre|ss: The|
|00003aa0| 20 55 6e 74 6f 6c 64 20 | 53 74 6f 72 79 2e 0d 53 | Untold |Story..S|
|00003ab0| 70 65 63 69 61 6c 20 43 | 6f 6e 73 69 64 65 72 61 |pecial C|onsidera|
|00003ac0| 74 69 6f 6e 73 0d 54 68 | 65 20 47 65 74 50 68 79 |tions.Th|e GetPhy|
|00003ad0| 73 69 63 61 6c 20 63 61 | 6c 6c 20 69 6e 20 52 4f |sical ca|ll in RO|
|00003ae0| 4d 20 61 6e 64 20 73 79 | 73 74 65 6d 20 73 6f 66 |M and sy|stem sof|
|00003af0| 74 77 61 72 65 20 63 75 | 72 72 65 6e 74 6c 79 20 |tware cu|rrently |
|00003b00| 73 75 70 70 6f 72 74 73 | 20 6f 6e 6c 79 20 6c 6f |supports| only lo|
|00003b10| 67 69 63 61 6c 20 52 41 | 4d 2e 20 20 54 68 69 73 |gical RA|M. This|
|00003b20| 20 65 78 63 6c 75 64 65 | 73 20 74 68 65 20 52 4f | exclude|s the RO|
|00003b30| 4d 2c 20 49 2f 4f 2c 20 | 61 6e 64 20 4e 75 42 75 |M, I/O, |and NuBu|
|00003b40| 73 20 73 70 61 63 65 73 | 20 66 72 6f 6d 20 74 68 |s spaces| from th|
|00003b50| 65 20 73 65 74 20 6f 66 | 20 61 64 64 72 65 73 73 |e set of| address|
|00003b60| 65 73 20 47 65 74 50 68 | 79 73 69 63 61 6c 20 6b |es GetPh|ysical k|
|00003b70| 6e 6f 77 73 20 68 6f 77 | 20 74 6f 20 74 72 61 6e |nows how| to tran|
|00003b80| 73 6c 61 74 65 2e 20 20 | 55 6e 66 6f 72 74 75 6e |slate. |Unfortun|
|00003b90| 61 74 65 6c 79 2c 20 6d | 61 63 68 69 6e 65 73 20 |ately, m|achines |
|00003ba0| 6c 69 6b 65 20 74 68 65 | 20 4d 61 63 69 6e 74 6f |like the| Macinto|
|00003bb0| 73 68 20 49 49 63 69 20 | 61 6e 64 20 4d 61 63 69 |sh IIci |and Maci|
|00003bc0| 6e 74 6f 73 68 20 49 49 | 73 69 20 75 73 65 20 74 |ntosh II|si use t|
|00003bd0| 68 65 20 4d 4d 55 20 74 | 6f 20 6d 61 70 20 61 20 |he MMU t|o map a |
|00003be0| 73 6d 61 6c 6c 20 61 6d | 6f 75 6e 74 20 6f 66 20 |small am|ount of |
|00003bf0| 70 68 79 73 69 63 61 6c | 20 6d 65 6d 6f 72 79 20 |physical| memory |
|00003c00| 69 6e 74 6f 20 4e 75 42 | 75 73 20 73 70 61 63 65 |into NuB|us space|
|00003c10| 20 73 6f 20 74 68 61 74 | 20 69 74 20 6c 6f 6f 6b | so that| it look|
|00003c20| 73 20 6c 69 6b 65 20 61 | 20 72 65 67 75 6c 61 72 |s like a| regular|
|00003c30| 20 76 69 64 65 6f 20 63 | 61 72 64 2e 20 20 49 64 | video c|ard. Id|
|00003c40| 65 61 6c 6c 79 20 6f 6e | 65 20 6d 69 67 68 74 20 |eally on|e might |
|00003c50| 6c 69 6b 65 20 74 6f 20 | 75 73 65 20 47 65 74 50 |like to |use GetP|
|00003c60| 68 79 73 69 63 61 6c 20 | 74 6f 20 67 65 74 20 74 |hysical |to get t|
|00003c70| 68 65 20 61 63 74 75 61 | 6c 20 52 41 4d 20 61 64 |he actua|l RAM ad|
|00003c80| 64 72 65 73 73 20 6f 66 | 20 74 68 65 20 76 69 64 |dress of| the vid|
|00003c90| 65 6f 20 62 75 66 66 65 | 72 20 28 74 6f 20 70 72 |eo buffe|r (to pr|
|00003ca0| 6f 76 69 64 65 20 44 4d | 41 20 73 75 70 70 6f 72 |ovide DM|A suppor|
|00003cb0| 74 20 66 6f 72 20 63 65 | 72 74 61 69 6e 20 6d 75 |t for ce|rtain mu|
|00003cc0| 6c 74 69 6d 65 64 69 61 | 20 70 72 6f 64 75 63 74 |ltimedia| product|
|00003cd0| 73 20 61 6e 64 20 67 72 | 61 70 68 69 63 73 20 61 |s and gr|aphics a|
|00003ce0| 63 63 65 6c 65 72 61 74 | 6f 72 73 29 2c 20 62 75 |ccelerat|ors), bu|
|00003cf0| 74 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 52 4f |t the cu|rrent RO|
|00003d00| 4d 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |M implem|entation|
|00003d10| 20 6f 66 20 47 65 74 50 | 68 79 73 69 63 61 6c 20 | of GetP|hysical |
|00003d20| 72 65 74 75 72 6e 73 20 | 61 20 70 61 72 61 6d 45 |returns |a paramE|
|00003d30| 72 72 20 28 2d 35 30 29 | 20 69 6e 20 72 65 73 70 |rr (-50)| in resp|
|00003d40| 6f 6e 73 65 20 74 6f 20 | 6c 6f 67 69 63 61 6c 20 |onse to |logical |
|00003d50| 4e 75 42 75 73 20 61 64 | 64 72 65 73 73 65 73 2e |NuBus ad|dresses.|
|00003d60| 0d 42 65 63 61 75 73 65 | 20 69 74 73 20 52 4f 4d |.Because| its ROM|
|00003d70| 20 69 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d | is deri|ved from|
|00003d80| 20 74 68 61 74 20 6f 66 | 20 74 68 65 20 4d 61 63 | that of| the Mac|
|00003d90| 69 6e 74 6f 73 68 20 49 | 49 63 69 2c 20 74 68 65 |intosh I|Ici, the|
|00003da0| 20 4d 61 63 69 6e 74 6f | 73 68 20 4c 43 20 6d 61 | Macinto|sh LC ma|
|00003db0| 79 20 61 70 70 65 61 72 | 20 74 6f 20 68 61 76 65 |y appear| to have|
|00003dc0| 20 5f 4d 65 6d 6f 72 79 | 44 69 73 70 61 74 63 68 | _Memory|Dispatch|
|00003dd0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 2e 20 20 54 | impleme|nted. T|
|00003de0| 68 69 73 20 64 6f 65 73 | 6e d5 74 20 6d 61 6b 65 |his does|n.t make|
|00003df0| 20 73 65 6e 73 65 2c 20 | 68 6f 77 65 76 65 72 2c | sense, |however,|
|00003e00| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 4c 43 20 | because| the LC |
|00003e10| 68 61 73 20 6e 6f 20 4d | 4d 55 2e 20 20 41 6c 74 |has no M|MU. Alt|
|00003e20| 68 6f 75 67 68 20 53 79 | 73 74 65 6d 20 53 6f 66 |hough Sy|stem Sof|
|00003e30| 74 77 61 72 65 20 37 2e | 30 20 70 61 74 63 68 65 |tware 7.|0 patche|
|00003e40| 73 20 5f 4d 65 6d 6f 72 | 79 44 69 73 70 61 74 63 |s _Memor|yDispatc|
|00003e50| 68 20 69 6e 20 74 68 69 | 73 20 63 61 73 65 20 74 |h in thi|s case t|
|00003e60| 6f 20 6d 61 6b 65 20 69 | 74 20 75 6e 69 6d 70 6c |o make i|t unimpl|
|00003e70| 65 6d 65 6e 74 65 64 2c | 20 50 72 69 6d 61 72 79 |emented,| Primary|
|00003e80| 49 6e 69 74 20 63 6f 64 | 65 20 61 6e 64 20 53 43 |Init cod|e and SC|
|00003e90| 53 49 20 64 72 69 76 65 | 72 73 20 77 68 69 63 68 |SI drive|rs which|
|00003ea0| 20 72 75 6e 20 62 65 66 | 6f 72 65 20 73 79 73 74 | run bef|ore syst|
|00003eb0| 65 6d 20 70 61 74 63 68 | 65 73 20 61 72 65 20 69 |em patch|es are i|
|00003ec0| 6e 73 74 61 6c 6c 65 64 | 20 63 6f 75 6c 64 20 62 |nstalled| could b|
|00003ed0| 65 20 61 66 66 65 63 74 | 65 64 2e 20 20 43 6f 64 |e affect|ed. Cod|
|00003ee0| 65 20 72 75 6e 6e 69 6e | 67 20 61 74 20 74 68 69 |e runnin|g at thi|
|00003ef0| 73 20 74 69 6d 65 20 73 | 68 6f 75 6c 64 20 71 75 |s time s|hould qu|
|00003f00| 61 6c 69 66 79 20 74 68 | 65 20 65 78 69 73 74 65 |alify th|e existe|
|00003f10| 6e 63 65 20 6f 66 20 5f | 4d 65 6d 6f 72 79 44 69 |nce of _|MemoryDi|
|00003f20| 73 70 61 74 63 68 20 77 | 69 74 68 20 74 68 65 20 |spatch w|ith the |
|00003f30| 65 78 69 73 74 65 6e 63 | 65 20 6f 66 20 61 6e 20 |existenc|e of an |
|00003f40| 4d 4d 55 2c 20 75 73 69 | 6e 67 20 5f 47 65 73 74 |MMU, usi|ng _Gest|
|00003f50| 61 6c 74 2e 0d 49 6e 20 | 6f 72 64 65 72 20 74 6f |alt..In |order to|
|00003f60| 20 73 6f 6c 76 65 20 62 | 6f 74 68 20 6f 66 20 74 | solve b|oth of t|
|00003f70| 68 65 73 65 20 70 72 6f | 62 6c 65 6d 73 20 61 73 |hese pro|blems as|
|00003f80| 20 63 6c 65 61 6e 6c 79 | 20 61 73 20 70 6f 73 73 | cleanly| as poss|
|00003f90| 69 62 6c 65 2c 20 74 68 | 65 20 4d 50 57 20 6c 69 |ible, th|e MPW li|
|00003fa0| 62 72 61 72 69 65 73 20 | 63 6f 6e 74 61 69 6e 20 |braries |contain |
|00003fb0| 61 6e 20 65 6e 68 61 6e | 63 65 64 20 76 65 72 73 |an enhan|ced vers|
|00003fc0| 69 6f 6e 20 6f 66 20 47 | 65 74 50 68 79 73 69 63 |ion of G|etPhysic|
|00003fd0| 61 6c 20 77 69 74 68 20 | 67 72 65 61 74 65 72 20 |al with |greater |
|00003fe0| 66 6c 65 78 69 62 69 6c | 69 74 79 20 74 68 61 6e |flexibil|ity than|
|00003ff0| 20 74 68 65 20 52 4f 4d | 20 76 65 72 73 69 6f 6e | the ROM| version|
|00004000| 2e 2a 20 20 41 6c 74 68 | 6f 75 67 68 20 74 68 65 |.* Alth|ough the|
|00004010| 20 65 6e 68 61 6e 63 65 | 64 20 76 65 72 73 69 6f | enhance|d versio|
|00004020| 6e 20 69 73 20 74 68 65 | 20 73 61 6d 65 20 61 73 |n is the| same as|
|00004030| 20 74 68 65 20 52 4f 4d | 20 76 65 72 73 69 6f 6e | the ROM| version|
|00004040| 20 69 6e 20 6d 6f 73 74 | 20 63 61 73 65 73 2c 20 | in most| cases, |
|00004050| 69 74 20 70 72 6f 76 69 | 64 65 73 20 65 78 74 72 |it provi|des extr|
|00004060| 61 20 76 61 6c 69 64 61 | 74 69 6f 6e 20 63 68 65 |a valida|tion che|
|00004070| 63 6b 73 20 74 6f 20 67 | 75 61 72 61 6e 74 65 65 |cks to g|uarantee|
|00004080| 20 73 74 61 62 69 6c 69 | 74 79 20 62 65 66 6f 72 | stabili|ty befor|
|00004090| 65 20 73 79 73 74 65 6d | 20 70 61 74 63 68 65 73 |e system| patches|
|000040a0| 20 61 72 65 20 69 6e 73 | 74 61 6c 6c 65 64 2c 20 | are ins|talled, |
|000040b0| 61 6e 64 20 69 74 20 61 | 70 70 6c 69 65 73 20 61 |and it a|pplies a|
|000040c0| 6c 74 65 72 6e 61 74 65 | 20 6d 65 63 68 61 6e 69 |lternate| mechani|
|000040d0| 73 6d 73 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |sms to d|etermine|
|000040e0| 20 74 68 65 20 70 68 79 | 73 69 63 61 6c 20 61 64 | the phy|sical ad|
|000040f0| 64 72 65 73 73 20 6f 66 | 20 61 20 52 41 4d 2d 62 |dress of| a RAM-b|
|00004100| 61 73 65 64 20 76 69 64 | 65 6f 20 62 75 66 66 65 |ased vid|eo buffe|
|00004110| 72 2e 20 20 59 6f 75 20 | 73 68 6f 75 6c 64 20 74 |r. You |should t|
|00004120| 68 65 72 65 66 6f 72 65 | 20 63 61 6c 6c 20 47 65 |herefore| call Ge|
|00004130| 74 50 68 79 73 69 63 61 | 6c 20 77 68 65 72 65 20 |tPhysica|l where |
|00004140| 69 74 20 69 73 20 69 6e | 64 69 63 61 74 65 64 2c |it is in|dicated,|
|00004150| 20 65 76 65 6e 20 66 6f | 72 20 61 64 64 72 65 73 | even fo|r addres|
|00004160| 73 20 73 70 61 63 65 73 | 20 77 68 65 72 65 20 74 |s spaces| where t|
|00004170| 68 65 20 52 4f 4d 20 76 | 65 72 73 69 6f 6e 20 69 |he ROM v|ersion i|
|00004180| 73 20 6b 6e 6f 77 6e 20 | 74 6f 20 72 65 74 75 72 |s known |to retur|
|00004190| 6e 20 61 6e 20 65 72 72 | 6f 72 2e 20 20 54 68 65 |n an err|or. The|
|000041a0| 20 67 6c 75 65 20 63 6f | 64 65 20 6d 61 79 20 70 | glue co|de may p|
|000041b0| 69 63 6b 20 75 70 20 74 | 68 65 20 73 6c 61 63 6b |ick up t|he slack|
|000041c0| 20 6f 72 20 61 20 66 75 | 74 75 72 65 20 52 4f 4d | or a fu|ture ROM|
|000041d0| 20 6d 69 67 68 74 20 6e | 6f 74 20 72 65 74 75 72 | might n|ot retur|
|000041e0| 6e 20 61 6e 20 65 72 72 | 6f 72 2e 20 20 49 6e 20 |n an err|or. In |
|000041f0| 61 6e 79 20 63 61 73 65 | 2c 20 79 6f 75 72 20 63 |any case|, your c|
|00004200| 6f 64 65 20 73 68 6f 75 | 6c 64 20 61 6c 77 61 79 |ode shou|ld alway|
|00004210| 73 20 62 65 20 70 72 65 | 70 61 72 65 64 20 74 6f |s be pre|pared to|
|00004220| 20 63 6f 70 65 20 77 69 | 74 68 20 61 6e 79 20 6f | cope wi|th any o|
|00004230| 66 20 74 68 65 20 47 65 | 74 50 68 79 73 69 63 61 |f the Ge|tPhysica|
|00004240| 6c 20 65 72 72 6f 72 20 | 72 65 73 75 6c 74 73 20 |l error |results |
|00004250| 64 6f 63 75 6d 65 6e 74 | 65 64 20 69 6e 20 49 6e |document|ed in In|
|00004260| 73 69 64 65 20 4d 61 63 | 69 6e 74 6f 73 68 2e 20 |side Mac|intosh. |
|00004270| 20 52 65 6d 65 6d 62 65 | 72 20 61 6c 77 61 79 73 | Remembe|r always|
|00004280| 20 74 6f 20 63 61 6c 6c | 20 4c 6f 63 6b 4d 65 6d | to call| LockMem|
|00004290| 6f 72 79 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ory befo|re calli|
|000042a0| 6e 67 20 47 65 74 50 68 | 79 73 69 63 61 6c 2c 20 |ng GetPh|ysical, |
|000042b0| 61 6e 64 20 55 6e 6c 6f | 63 6b 4d 65 6d 6f 72 79 |and Unlo|ckMemory|
|000042c0| 20 61 73 20 73 6f 6f 6e | 20 61 73 20 70 6f 73 73 | as soon| as poss|
|000042d0| 69 62 6c 65 20 61 66 74 | 65 72 77 61 72 64 73 2e |ible aft|erwards.|
|000042e0| 0d 56 4d 20 43 6f 6d 70 | 61 74 69 62 69 6c 69 74 |.VM Comp|atibilit|
|000042f0| 79 0d 43 6f 6d 70 61 74 | 69 62 69 6c 69 74 79 20 |y.Compat|ibility |
|00004300| 57 69 74 68 20 41 63 63 | 65 6c 65 72 61 74 6f 72 |With Acc|elerator|
|00004310| 20 55 70 67 72 61 64 65 | 73 0d 54 68 65 20 62 75 | Upgrade|s.The bu|
|00004320| 72 64 65 6e 20 6f 66 20 | 63 6f 6d 70 61 74 69 62 |rden of |compatib|
|00004330| 69 6c 69 74 79 20 68 61 | 73 20 6c 6f 6e 67 20 62 |ility ha|s long b|
|00004340| 65 65 6e 20 6f 6e 20 74 | 68 65 20 73 68 6f 75 6c |een on t|he shoul|
|00004350| 64 65 72 73 20 6f 66 20 | 61 63 63 65 6c 65 72 61 |ders of |accelera|
|00004360| 74 6f 72 20 6d 61 6e 75 | 66 61 63 74 75 72 65 72 |tor manu|facturer|
|00004370| 73 2e 20 20 56 4d 20 6d | 61 79 20 70 72 65 73 65 |s. VM m|ay prese|
|00004380| 6e 74 20 73 6f 6d 65 20 | 61 64 64 69 74 69 6f 6e |nt some |addition|
|00004390| 61 6c 20 63 6f 6d 70 61 | 74 69 62 69 6c 69 74 79 |al compa|tibility|
|000043a0| 20 63 68 61 6c 6c 65 6e | 67 65 73 20 66 6f 72 20 | challen|ges for |
|000043b0| 74 68 65 73 65 20 6d 61 | 6e 75 66 61 63 74 75 72 |these ma|nufactur|
|000043c0| 65 72 73 2e 0d 56 69 72 | 74 75 61 6c 20 4d 65 6d |ers..Vir|tual Mem|
|000043d0| 6f 72 79 20 72 65 71 75 | 69 72 65 73 20 73 65 72 |ory requ|ires ser|
|000043e0| 76 69 63 65 73 20 77 68 | 69 63 68 20 61 72 65 20 |vices wh|ich are |
|000043f0| 6e 6f 74 20 70 72 65 73 | 65 6e 74 20 69 6e 20 74 |not pres|ent in t|
|00004400| 68 65 20 52 4f 4d 73 20 | 6f 66 20 36 38 30 30 30 |he ROMs |of 68000|
|00004410| 2d 62 61 73 65 64 20 6d | 61 63 68 69 6e 65 73 2c |-based m|achines,|
|00004420| 20 73 6f 20 56 4d 20 69 | 73 20 6e 6f 74 20 73 75 | so VM i|s not su|
|00004430| 70 70 6f 72 74 65 64 20 | 62 79 20 74 68 65 20 4d |pported |by the M|
|00004440| 61 63 69 6e 74 6f 73 68 | 20 53 45 2c 20 65 76 65 |acintosh| SE, eve|
|00004450| 6e 20 6f 6e 65 20 77 69 | 74 68 20 61 20 36 38 30 |n one wi|th a 680|
|00004460| 33 30 20 61 63 63 65 6c | 65 72 61 74 6f 72 2e 20 |30 accel|erator. |
|00004470| 20 54 68 65 20 73 61 6d | 65 20 69 73 20 74 72 75 | The sam|e is tru|
|00004480| 65 20 6f 66 20 74 68 65 | 20 4d 61 63 69 6e 74 6f |e of the| Macinto|
|00004490| 73 68 20 50 6c 75 73 2c | 20 74 68 65 20 4d 61 63 |sh Plus,| the Mac|
|000044a0| 69 6e 74 6f 73 68 20 43 | 6c 61 73 73 69 63 2c 20 |intosh C|lassic, |
|000044b0| 61 6e 64 20 74 68 65 20 | 4d 61 63 69 6e 74 6f 73 |and the |Macintos|
|000044c0| 68 20 50 6f 72 74 61 62 | 6c 65 2e 20 20 54 68 65 |h Portab|le. The|
|000044d0| 72 65 20 69 73 20 6e 6f | 20 67 75 61 72 61 6e 74 |re is no| guarant|
|000044e0| 65 65 20 74 68 61 74 20 | 74 68 65 73 65 20 6f 6c |ee that |these ol|
|000044f0| 64 65 72 20 6d 61 63 68 | 69 6e 65 73 20 77 69 6c |der mach|ines wil|
|00004500| 6c 20 65 76 65 72 20 62 | 65 20 61 62 6c 65 20 74 |l ever b|e able t|
|00004510| 6f 20 73 75 70 70 6f 72 | 74 20 56 4d 2e 20 20 46 |o suppor|t VM. F|
|00004520| 6f 72 20 70 72 61 63 74 | 69 63 61 6c 20 72 65 61 |or pract|ical rea|
|00004530| 73 6f 6e 73 2c 20 41 70 | 70 6c 65 20 68 61 73 20 |sons, Ap|ple has |
|00004540| 63 68 6f 73 65 6e 20 6e | 6f 74 20 74 6f 20 69 6d |chosen n|ot to im|
|00004550| 70 6c 65 6d 65 6e 74 20 | 56 4d 20 69 6e 20 61 20 |plement |VM in a |
|00004560| 77 68 6f 6c 6c 79 20 52 | 4f 4d 2d 69 6e 64 65 70 |wholly R|OM-indep|
|00004570| 65 6e 64 65 6e 74 20 6d | 61 6e 6e 65 72 2e 20 20 |endent m|anner. |
|00004580| 49 6e 20 74 68 65 20 66 | 6f 72 65 73 65 65 61 62 |In the f|oreseeab|
|00004590| 6c 65 20 66 75 74 75 72 | 65 2c 20 6f 6e 6c 79 20 |le futur|e, only |
|000045a0| 6d 61 63 68 69 6e 65 73 | 20 69 6e 20 77 68 69 63 |machines| in whic|
|000045b0| 68 20 41 70 70 6c 65 20 | 69 6e 74 65 6e 64 65 64 |h Apple |intended|
|000045c0| 20 74 6f 20 69 6e 63 6c | 75 64 65 20 6d 65 6d 6f | to incl|ude memo|
|000045d0| 72 79 20 6d 61 6e 61 67 | 65 6d 65 6e 74 20 75 6e |ry manag|ement un|
|000045e0| 69 74 73 20 63 61 6e 20 | 73 75 70 70 6f 72 74 20 |its can |support |
|000045f0| 56 69 72 74 75 61 6c 20 | 4d 65 6d 6f 72 79 2e 20 |Virtual |Memory. |
|00004600| 20 4d 61 63 68 69 6e 65 | 73 20 6e 65 76 65 72 20 | Machine|s never |
|00004610| 69 6e 74 65 6e 64 65 64 | 20 74 6f 20 69 6e 63 6c |intended| to incl|
|00004620| 75 64 65 20 61 6e 20 4d | 4d 55 20 64 6f 20 6e 6f |ude an M|MU do no|
|00004630| 74 20 68 61 76 65 20 61 | 6c 6c 20 74 68 65 20 52 |t have a|ll the R|
|00004640| 4f 4d 20 63 6f 64 65 20 | 72 65 71 75 69 72 65 64 |OM code |required|
|00004650| 20 62 79 20 56 4d 2e 0d | 56 69 72 74 75 61 6c 20 | by VM..|Virtual |
|00004660| 4d 65 6d 6f 72 79 20 64 | 65 70 65 6e 64 73 20 6f |Memory d|epends o|
|00004670| 6e 20 6c 6f 77 2d 6d 65 | 6d 6f 72 79 20 67 6c 6f |n low-me|mory glo|
|00004680| 62 61 6c 73 20 74 6f 20 | 69 6e 64 69 63 61 74 65 |bals to |indicate|
|00004690| 20 74 68 65 20 70 72 65 | 73 65 6e 63 65 20 6f 66 | the pre|sence of|
|000046a0| 20 61 20 6d 65 6d 6f 72 | 79 20 6d 61 6e 61 67 65 | a memor|y manage|
|000046b0| 6d 65 6e 74 20 75 6e 69 | 74 20 61 74 20 61 20 76 |ment uni|t at a v|
|000046c0| 65 72 79 20 65 61 72 6c | 79 20 73 74 61 67 65 20 |ery earl|y stage |
|000046d0| 6f 66 20 74 68 65 20 62 | 6f 6f 74 20 70 72 6f 63 |of the b|oot proc|
|000046e0| 65 73 73 2e 20 20 49 6e | 20 73 6f 6d 65 20 63 61 |ess. In| some ca|
|000046f0| 73 65 73 2c 20 74 68 65 | 20 6c 6f 77 2d 6d 65 6d |ses, the| low-mem|
|00004700| 6f 72 79 20 67 6c 6f 62 | 61 6c 73 20 61 72 65 20 |ory glob|als are |
|00004710| 6e 6f 74 20 70 72 6f 70 | 65 72 6c 79 20 73 65 74 |not prop|erly set|
|00004720| 20 62 79 20 74 68 65 20 | 62 6f 6f 74 20 63 6f 64 | by the |boot cod|
|00004730| 65 20 69 6e 20 52 4f 4d | 20 69 66 20 74 68 65 20 |e in ROM| if the |
|00004740| 68 61 72 64 77 61 72 65 | 20 66 65 61 74 75 72 65 |hardware| feature|
|00004750| 73 20 6f 66 20 61 6e 20 | 61 63 63 65 6c 65 72 61 |s of an |accelera|
|00004760| 74 6f 72 20 61 72 65 20 | 73 69 67 6e 69 66 69 63 |tor are |signific|
|00004770| 61 6e 74 6c 79 20 64 69 | 66 66 65 72 65 6e 74 20 |antly di|fferent |
|00004780| 66 72 6f 6d 20 74 68 6f | 73 65 20 6f 66 20 74 68 |from tho|se of th|
|00004790| 65 20 73 74 6f 63 6b 20 | 4d 61 63 69 6e 74 6f 73 |e stock |Macintos|
|000047a0| 68 2e 20 20 54 68 65 20 | 6d 6f 73 74 20 6c 69 6b |h. The |most lik|
|000047b0| 65 6c 79 20 70 72 6f 62 | 6c 65 6d 73 20 61 72 65 |ely prob|lems are|
|000047c0| 20 65 78 68 69 62 69 74 | 65 64 20 62 79 20 36 38 | exhibit|ed by 68|
|000047d0| 30 30 30 20 4d 61 63 69 | 6e 74 6f 73 68 65 73 2c |000 Maci|ntoshes,|
|000047e0| 20 36 38 30 32 30 20 4d | 61 63 69 6e 74 6f 73 68 | 68020 M|acintosh|
|000047f0| 65 73 20 77 69 74 68 20 | 36 38 30 33 30 20 61 63 |es with |68030 ac|
|00004800| 63 65 6c 65 72 61 74 6f | 72 73 2c 20 61 6e 64 20 |celerato|rs, and |
|00004810| 4d 61 63 69 6e 74 6f 73 | 68 65 73 20 77 69 74 68 |Macintos|hes with|
|00004820| 20 36 38 30 34 30 20 61 | 63 63 65 6c 65 72 61 74 | 68040 a|ccelerat|
|00004830| 6f 72 73 2e 20 20 54 68 | 65 72 65 20 69 73 20 74 |ors. Th|ere is t|
|00004840| 68 69 72 64 2d 70 61 72 | 74 79 20 76 69 72 74 75 |hird-par|ty virtu|
|00004850| 61 6c 20 6d 65 6d 6f 72 | 79 20 73 6f 66 74 77 61 |al memor|y softwa|
|00004860| 72 65 20 77 68 69 63 68 | 20 70 72 6f 76 69 64 65 |re which| provide|
|00004870| 73 20 6d 75 63 68 20 6f | 66 20 74 68 65 20 56 4d |s much o|f the VM|
|00004880| 20 66 75 6e 63 74 69 6f | 6e 61 6c 69 74 79 20 6f | functio|nality o|
|00004890| 66 20 53 79 73 74 65 6d | 20 53 6f 66 74 77 61 72 |f System| Softwar|
|000048a0| 65 20 37 2e 30 2c 20 61 | 6e 64 20 77 68 69 63 68 |e 7.0, a|nd which|
|000048b0| 20 69 73 20 61 6c 73 6f | 20 63 6f 6d 70 61 74 69 | is also| compati|
|000048c0| 62 6c 65 20 77 69 74 68 | 20 61 63 63 65 6c 65 72 |ble with| acceler|
|000048d0| 61 74 6f 72 20 70 72 6f | 64 75 63 74 73 2e 20 20 |ator pro|ducts. |
|000048e0| 49 6e 20 73 6f 6d 65 20 | 63 61 73 65 73 20 74 68 |In some |cases th|
|000048f0| 69 73 20 73 6f 66 74 77 | 61 72 65 20 6d 61 79 20 |is softw|are may |
|00004900| 62 65 20 62 75 6e 64 6c | 65 64 20 77 69 74 68 20 |be bundl|ed with |
|00004910| 74 68 65 20 61 63 63 65 | 6c 65 72 61 74 6f 72 2e |the acce|lerator.|
|00004920| 0d 41 70 70 6c 65 20 69 | 73 20 6e 6f 74 20 73 61 |.Apple i|s not sa|
|00004930| 79 69 6e 67 20 74 68 61 | 74 20 56 4d 20 64 6f 65 |ying tha|t VM doe|
|00004940| 73 20 6e 6f 74 20 77 6f | 72 6b 20 77 69 74 68 20 |s not wo|rk with |
|00004950| 61 6e 79 20 61 63 63 65 | 6c 65 72 61 74 6f 72 2c |any acce|lerator,|
|00004960| 20 62 75 74 20 72 61 74 | 68 65 72 20 74 68 61 74 | but rat|her that|
|00004970| 20 74 68 65 20 53 79 73 | 74 65 6d 20 37 2e 30 20 | the Sys|tem 7.0 |
|00004980| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 6f |implemen|tation o|
|00004990| 66 20 56 69 72 74 75 61 | 6c 20 4d 65 6d 6f 72 79 |f Virtua|l Memory|
|000049a0| 20 69 6e 20 67 65 6e 65 | 72 61 6c 20 64 6f 65 73 | in gene|ral does|
|000049b0| 20 6e 6f 74 20 73 75 70 | 70 6f 72 74 20 61 63 63 | not sup|port acc|
|000049c0| 65 6c 65 72 61 74 6f 72 | 73 2e 20 20 53 6f 6d 65 |elerator|s. Some|
|000049d0| 20 61 63 63 65 6c 65 72 | 61 74 6f 72 20 70 72 6f | acceler|ator pro|
|000049e0| 64 75 63 74 73 20 6d 61 | 79 20 77 6f 72 6b 20 6f |ducts ma|y work o|
|000049f0| 72 20 6d 61 79 20 62 65 | 20 6d 6f 64 69 66 69 65 |r may be| modifie|
|00004a00| 64 20 74 6f 20 77 6f 72 | 6b 2e 20 20 41 70 70 6c |d to wor|k. Appl|
|00004a10| 65 20 73 69 6d 70 6c 79 | 20 64 6f 65 73 20 6e 6f |e simply| does no|
|00004a20| 74 20 67 75 61 72 61 6e | 74 65 65 20 74 68 61 74 |t guaran|tee that|
|00004a30| 20 61 6e 79 20 70 61 72 | 74 69 63 75 6c 61 72 20 | any par|ticular |
|00004a40| 61 63 63 65 6c 65 72 61 | 74 6f 72 20 70 72 6f 64 |accelera|tor prod|
|00004a50| 75 63 74 20 77 6f 72 6b | 73 20 77 69 74 68 20 56 |uct work|s with V|
|00004a60| 4d 2e 0d 43 6f 6d 70 61 | 74 69 62 69 6c 69 74 79 |M..Compa|tibility|
|00004a70| 20 57 69 74 68 20 52 65 | 6d 6f 76 61 62 6c 65 20 | With Re|movable |
|00004a80| 4d 65 64 69 61 0d 4f 62 | 76 69 6f 75 73 6c 79 20 |Media.Ob|viously |
|00004a90| 69 74 20 77 6f 75 6c 64 | 20 62 65 20 61 20 64 69 |it would| be a di|
|00004aa0| 73 61 73 74 65 72 20 69 | 66 20 61 20 75 73 65 72 |saster i|f a user|
|00004ab0| 20 65 6a 65 63 74 65 64 | 20 74 68 65 20 63 61 72 | ejected| the car|
|00004ac0| 74 72 69 64 67 65 20 63 | 6f 6e 74 61 69 6e 69 6e |tridge c|ontainin|
|00004ad0| 67 20 68 69 73 20 62 61 | 63 6b 69 6e 67 20 73 74 |g his ba|cking st|
|00004ae0| 6f 72 65 20 28 70 61 67 | 65 64 20 6f 75 74 20 6d |ore (pag|ed out m|
|00004af0| 65 6d 6f 72 79 29 20 61 | 6e 64 20 68 61 6e 64 65 |emory) a|nd hande|
|00004b00| 64 20 69 74 20 74 6f 20 | 61 20 63 6f 77 6f 72 6b |d it to |a cowork|
|00004b10| 65 72 20 74 6f 20 74 61 | 6b 65 20 68 6f 6d 65 2e |er to ta|ke home.|
|00004b20| 20 20 54 68 69 73 20 77 | 6f 75 6c 64 20 62 65 20 | This w|ould be |
|00004b30| 6d 75 63 68 20 77 6f 72 | 73 65 20 74 68 61 6e 20 |much wor|se than |
|00004b40| 67 69 76 69 6e 67 20 61 | 77 61 79 20 61 20 66 6c |giving a|way a fl|
|00004b50| 6f 70 70 79 2c 20 74 6f | 20 62 65 20 66 61 63 65 |oppy, to| be face|
|00004b60| 64 20 77 69 74 68 20 74 | 68 65 20 d2 50 6c 65 61 |d with t|he .Plea|
|00004b70| 73 65 20 69 6e 73 65 72 | 74 20 74 68 65 20 64 69 |se inser|t the di|
|00004b80| 73 6b c9 d3 20 61 6c 65 | 72 74 2e 20 20 53 6f 6d |sk.. ale|rt. Som|
|00004b90| 65 6f 6e 65 20 77 6f 75 | 6c 64 20 61 63 74 75 61 |eone wou|ld actua|
|00004ba0| 6c 6c 79 20 68 61 76 65 | 20 70 61 72 74 20 6f 66 |lly have| part of|
|00004bb0| 20 74 68 65 20 63 6f 6d | 70 75 74 65 72 d5 73 20 | the com|puter.s |
|00004bc0| 6d 65 6d 6f 72 79 20 69 | 6e 20 68 69 73 20 62 72 |memory i|n his br|
|00004bd0| 69 65 66 63 61 73 65 d1 | 74 72 79 20 74 6f 20 74 |iefcase.|try to t|
|00004be0| 79 70 65 20 43 6f 6d 6d | 61 6e 64 2d 70 65 72 69 |ype Comm|and-peri|
|00004bf0| 6f 64 20 61 6e 64 20 67 | 65 74 20 6f 75 74 20 6f |od and g|et out o|
|00004c00| 66 20 74 68 61 74 20 6f | 6e 65 2e 20 20 54 6f 20 |f that o|ne. To |
|00004c10| 67 75 61 72 64 20 61 67 | 61 69 6e 73 74 20 74 68 |guard ag|ainst th|
|00004c20| 69 73 20 70 6f 73 73 69 | 62 69 6c 69 74 79 2c 20 |is possi|bility, |
|00004c30| 65 6a 65 63 74 61 62 6c | 65 20 6d 65 64 69 61 20 |ejectabl|e media |
|00004c40| 61 72 65 20 6e 6f 74 20 | 70 65 72 6d 69 74 74 65 |are not |permitte|
|00004c50| 64 20 74 6f 20 68 6f 73 | 74 20 74 68 65 20 56 4d |d to hos|t the VM|
|00004c60| 20 62 61 63 6b 69 6e 67 | 20 73 74 6f 72 65 2e 20 | backing| store. |
|00004c70| 20 55 73 65 72 73 20 6f | 66 20 72 65 6d 6f 76 61 | Users o|f remova|
|00004c80| 62 6c 65 20 63 61 72 74 | 72 69 64 67 65 20 64 72 |ble cart|ridge dr|
|00004c90| 69 76 65 73 20 61 72 65 | 20 6e 6f 74 20 77 68 6f |ives are| not who|
|00004ca0| 6c 6c 79 20 65 78 63 6c | 75 64 65 64 2c 20 68 6f |lly excl|uded, ho|
|00004cb0| 77 65 76 65 72 2e 20 20 | 54 68 65 20 64 72 69 76 |wever. |The driv|
|00004cc0| 65 72 20 73 6f 66 74 77 | 61 72 65 20 66 6f 72 20 |er softw|are for |
|00004cd0| 73 75 63 68 20 61 20 64 | 72 69 76 65 20 6d 61 79 |such a d|rive may|
|00004ce0| 20 69 6d 70 6f 73 65 20 | 73 6f 66 74 77 61 72 65 | impose |software|
|00004cf0| 20 69 6e 74 65 72 6c 6f | 63 6b 73 20 74 6f 20 70 | interlo|cks to p|
|00004d00| 72 65 76 65 6e 74 20 65 | 6a 65 63 74 69 6f 6e 20 |revent e|jection |
|00004d10| 61 6e 64 20 69 6e 64 69 | 63 61 74 65 20 69 6e 20 |and indi|cate in |
|00004d20| 74 68 65 20 64 72 69 76 | 65 20 71 75 65 75 65 20 |the driv|e queue |
|00004d30| 74 68 61 74 20 74 68 65 | 20 63 61 72 74 72 69 64 |that the| cartrid|
|00004d40| 67 65 20 69 73 20 6e 6f | 6e 65 6a 65 63 74 61 62 |ge is no|nejectab|
|00004d50| 6c 65 2e 20 20 56 4d 20 | 61 63 63 65 70 74 73 20 |le. VM |accepts |
|00004d60| 61 6e 79 20 73 75 66 66 | 69 63 69 65 6e 74 6c 79 |any suff|iciently|
|00004d70| 20 6c 61 72 67 65 2c 20 | 62 6c 6f 63 6b 20 6f 72 | large, |block or|
|00004d80| 69 65 6e 74 65 64 20 64 | 65 76 69 63 65 20 61 73 |iented d|evice as|
|00004d90| 20 6c 6f 6e 67 20 61 73 | 20 69 74 20 69 73 20 6e | long as| it is n|
|00004da0| 6f 74 20 65 6a 65 63 74 | 61 62 6c 65 2e 0d 43 6f |ot eject|able..Co|
|00004db0| 6d 70 61 74 69 62 69 6c | 69 74 79 20 57 69 74 68 |mpatibil|ity With|
|00004dc0| 20 53 43 53 49 20 43 6f | 64 65 0d 56 69 72 74 75 | SCSI Co|de.Virtu|
|00004dd0| 61 6c 20 4d 65 6d 6f 72 | 79 20 69 6e 74 72 6f 64 |al Memor|y introd|
|00004de0| 75 63 65 73 20 6e 65 77 | 20 72 65 71 75 69 72 65 |uces new| require|
|00004df0| 6d 65 6e 74 73 20 66 6f | 72 20 73 6f 6d 65 20 53 |ments fo|r some S|
|00004e00| 43 53 49 20 68 61 72 64 | 20 64 69 73 6b 20 64 72 |CSI hard| disk dr|
|00004e10| 69 76 65 72 73 2e 20 20 | 55 73 65 72 73 20 6f 66 |ivers. |Users of|
|00004e20| 20 41 70 70 6c 65 20 68 | 61 72 64 20 64 69 73 6b | Apple h|ard disk|
|00004e30| 73 20 6d 61 79 20 6e 65 | 65 64 20 74 6f 20 75 70 |s may ne|ed to up|
|00004e40| 64 61 74 65 20 74 68 65 | 69 72 20 64 72 69 76 65 |date the|ir drive|
|00004e50| 72 73 20 77 69 74 68 20 | 61 20 53 79 73 74 65 6d |rs with |a System|
|00004e60| 20 53 6f 66 74 77 61 72 | 65 20 37 2e 30 d0 63 6f | Softwar|e 7.0.co|
|00004e70| 6d 70 61 74 69 62 6c 65 | 20 41 70 70 6c 65 20 48 |mpatible| Apple H|
|00004e80| 44 20 53 43 20 53 65 74 | 75 70 20 61 70 70 6c 69 |D SC Set|up appli|
|00004e90| 63 61 74 69 6f 6e 2e 20 | 20 54 68 69 72 64 2d 70 |cation. | Third-p|
|00004ea0| 61 72 74 79 20 68 61 72 | 64 20 64 69 73 6b 20 64 |arty har|d disk d|
|00004eb0| 72 69 76 65 72 73 20 6d | 61 79 20 61 6c 73 6f 20 |rivers m|ay also |
|00004ec0| 6e 65 65 64 20 74 6f 20 | 62 65 20 75 70 64 61 74 |need to |be updat|
|00004ed0| 65 64 2e 20 20 49 74 20 | 69 73 20 75 70 20 74 6f |ed. It |is up to|
|00004ee0| 20 74 68 65 73 65 20 74 | 68 69 72 64 20 70 61 72 | these t|hird par|
|00004ef0| 74 69 65 73 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |ties to |determin|
|00004f00| 65 20 77 68 61 74 20 65 | 6e 68 61 6e 63 65 6d 65 |e what e|nhanceme|
|00004f10| 6e 74 73 2c 20 69 66 20 | 61 6e 79 2c 20 61 72 65 |nts, if |any, are|
|00004f20| 20 72 65 71 75 69 72 65 | 64 20 66 6f 72 20 74 68 | require|d for th|
|00004f30| 65 69 72 20 64 72 69 76 | 65 72 73 20 61 6e 64 20 |eir driv|ers and |
|00004f40| 74 6f 20 70 72 6f 76 69 | 64 65 20 75 70 64 61 74 |to provi|de updat|
|00004f50| 65 73 20 74 6f 20 74 68 | 65 69 72 20 63 75 73 74 |es to th|eir cust|
|00004f60| 6f 6d 65 72 73 20 69 66 | 20 6e 65 63 65 73 73 61 |omers if| necessa|
|00004f70| 72 79 2e 0d 46 6f 72 20 | 53 43 53 49 20 64 69 73 |ry..For |SCSI dis|
|00004f80| 6b 20 64 72 69 76 65 72 | 20 64 65 76 65 6c 6f 70 |k driver| develop|
|00004f90| 65 72 73 2c 20 6f 6e 65 | 20 72 65 71 75 69 72 65 |ers, one| require|
|00004fa0| 6d 65 6e 74 20 66 6f 72 | 20 56 4d 20 63 6f 6d 70 |ment for| VM comp|
|00004fb0| 61 74 69 62 69 6c 69 74 | 79 20 6d 61 79 20 62 65 |atibilit|y may be|
|00004fc0| 20 73 75 6d 6d 61 72 69 | 7a 65 64 20 61 73 20 66 | summari|zed as f|
|00004fd0| 6f 6c 6c 6f 77 73 20 28 | 73 70 65 63 69 61 6c 20 |ollows (|special |
|00004fe0| 74 68 61 6e 6b 73 20 74 | 6f 20 41 6e 64 79 20 47 |thanks t|o Andy G|
|00004ff0| 6f 6e 67 20 66 6f 72 20 | 74 68 65 20 64 65 74 61 |ong for |the deta|
|00005000| 69 6c 65 64 20 61 6e 61 | 6c 79 73 69 73 29 3a 0d |iled ana|lysis):.|
|00005010| 4f 6e 20 53 79 73 74 65 | 6d 20 36 2e 30 2e 78 20 |On Syste|m 6.0.x |
|00005020| 61 6e 64 20 65 61 72 6c | 69 65 72 2c 20 61 6c 6c |and earl|ier, all|
|00005030| 20 63 61 6c 6c 73 20 74 | 6f 20 74 68 65 20 53 43 | calls t|o the SC|
|00005040| 53 49 20 64 69 73 6b 20 | 64 72 69 76 65 72 20 63 |SI disk |driver c|
|00005050| 61 6d 65 20 66 72 6f 6d | 20 74 68 65 20 66 69 6c |ame from| the fil|
|00005060| 65 20 73 79 73 74 65 6d | 2e 20 20 54 68 69 73 20 |e system|. This |
|00005070| 62 65 69 6e 67 20 74 72 | 75 65 2c 20 61 6e 64 20 |being tr|ue, and |
|00005080| 74 68 65 20 66 69 6c 65 | 20 73 79 73 74 65 6d 20 |the file| system |
|00005090| 62 65 69 6e 67 20 73 69 | 6e 67 6c 65 2d 74 68 72 |being si|ngle-thr|
|000050a0| 65 61 64 65 64 2c 20 6f | 6e 6c 79 20 6f 6e 65 20 |eaded, o|nly one |
|000050b0| 53 43 53 49 20 64 69 73 | 6b 20 64 72 69 76 65 72 |SCSI dis|k driver|
|000050c0| 20 77 6f 75 6c 64 20 62 | 65 20 63 61 6c 6c 65 64 | would b|e called|
|000050d0| 20 61 74 20 61 6e 79 20 | 6f 6e 65 20 74 69 6d 65 | at any |one time|
|000050e0| 2e 20 20 56 69 72 74 75 | 61 6c 20 4d 65 6d 6f 72 |. Virtu|al Memor|
|000050f0| 79 20 63 68 61 6e 67 65 | 73 20 74 68 69 73 20 73 |y change|s this s|
|00005100| 63 65 6e 61 72 69 6f 20 | 62 65 63 61 75 73 65 20 |cenario |because |
|00005110| 69 74 20 6d 61 6b 65 73 | 20 63 61 6c 6c 73 20 74 |it makes| calls t|
|00005120| 6f 20 74 68 65 20 64 72 | 69 76 65 72 20 64 69 72 |o the dr|iver dir|
|00005130| 65 63 74 6c 79 2c 20 61 | 76 6f 69 64 69 6e 67 20 |ectly, a|voiding |
|00005140| 74 68 65 20 66 69 6c 65 | 20 73 79 73 74 65 6d 2e |the file| system.|
|00005150| 20 20 54 68 69 73 20 69 | 6d 70 6c 69 65 73 20 74 | This i|mplies t|
|00005160| 68 65 20 70 6f 73 73 69 | 62 69 6c 69 74 79 20 6f |he possi|bility o|
|00005170| 66 20 53 43 53 49 20 64 | 72 69 76 65 72 73 20 62 |f SCSI d|rivers b|
|00005180| 65 69 6e 67 20 72 65 65 | 6e 74 65 72 65 64 2e 0d |eing ree|ntered..|
|00005190| 46 6f 72 20 61 20 53 43 | 53 49 20 64 72 69 76 65 |For a SC|SI drive|
|000051a0| 72 20 74 6f 20 66 75 6e | 63 74 69 6f 6e 20 63 6f |r to fun|ction co|
|000051b0| 72 72 65 63 74 6c 79 20 | 69 6e 20 74 68 65 20 56 |rrectly |in the V|
|000051c0| 4d 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 2c 20 74 |M enviro|nment, t|
|000051d0| 68 65 20 64 72 69 76 65 | 72 20 6d 75 73 74 20 68 |he drive|r must h|
|000051e0| 61 76 65 20 63 6f 6d 70 | 6c 65 74 65 20 64 72 69 |ave comp|lete dri|
|000051f0| 76 65 72 20 64 61 74 61 | 20 73 65 70 61 72 61 74 |ver data| separat|
|00005200| 69 6f 6e 20 61 74 20 6c | 65 61 73 74 20 6f 6e 20 |ion at l|east on |
|00005210| 61 20 64 72 69 76 65 2d | 62 79 2d 64 72 69 76 65 |a drive-|by-drive|
|00005220| 20 62 61 73 69 73 2e 20 | 20 53 75 63 68 20 73 65 | basis. | Such se|
|00005230| 70 61 72 61 74 69 6f 6e | 20 6d 61 6b 65 73 20 74 |paration| makes t|
|00005240| 68 65 20 64 72 69 76 65 | 72 20 72 65 65 6e 74 72 |he drive|r reentr|
|00005250| 61 6e 74 20 6f 6e 20 61 | 20 64 72 69 76 65 2d 62 |ant on a| drive-b|
|00005260| 79 2d 64 72 69 76 65 20 | 62 61 73 69 73 2e 20 20 |y-drive |basis. |
|00005270| 49 66 20 74 68 65 20 64 | 72 69 76 65 72 20 73 75 |If the d|river su|
|00005280| 70 70 6f 72 74 73 20 6d | 75 6c 74 69 70 6c 65 20 |pports m|ultiple |
|00005290| 48 46 53 20 70 61 72 74 | 69 74 69 6f 6e 73 20 6f |HFS part|itions o|
|000052a0| 6e 20 74 68 65 20 73 61 | 6d 65 20 70 68 79 73 69 |n the sa|me physi|
|000052b0| 63 61 6c 20 64 72 69 76 | 65 2c 20 74 68 65 20 64 |cal driv|e, the d|
|000052c0| 72 69 76 65 72 20 6d 75 | 73 74 20 62 65 20 63 6f |river mu|st be co|
|000052d0| 6d 70 6c 65 74 65 6c 79 | 20 72 65 65 6e 74 72 61 |mpletely| reentra|
|000052e0| 6e 74 20 69 66 20 61 6e | 79 20 6f 66 20 74 68 65 |nt if an|y of the|
|000052f0| 20 48 46 53 20 70 61 72 | 74 69 74 69 6f 6e 73 20 | HFS par|titions |
|00005300| 61 72 65 20 74 6f 20 62 | 65 20 75 73 65 64 20 66 |are to b|e used f|
|00005310| 6f 72 20 74 68 65 20 56 | 4d 20 62 61 63 6b 69 6e |or the V|M backin|
|00005320| 67 20 66 69 6c 65 2e 0d | 41 6c 6c 20 74 68 69 73 |g file..|All this|
|00005330| 20 6d 65 61 6e 73 20 69 | 73 20 74 68 61 74 20 61 | means i|s that a|
|00005340| 20 64 72 69 76 65 72 20 | 77 68 69 63 68 20 63 6f | driver |which co|
|00005350| 6e 74 72 6f 6c 73 20 6d | 75 6c 74 69 70 6c 65 20 |ntrols m|ultiple |
|00005360| 64 72 69 76 65 73 20 6f | 72 20 70 61 72 74 69 74 |drives o|r partit|
|00005370| 69 6f 6e 73 20 6d 75 73 | 74 20 6d 61 69 6e 74 61 |ions mus|t mainta|
|00005380| 69 6e 20 73 65 70 61 72 | 61 74 65 20 64 72 69 76 |in separ|ate driv|
|00005390| 65 72 20 76 61 72 69 61 | 62 6c 65 73 20 74 6f 20 |er varia|bles to |
|000053a0| 72 65 66 65 72 65 6e 63 | 65 20 65 61 63 68 20 64 |referenc|e each d|
|000053b0| 72 69 76 65 20 6f 72 20 | 70 61 72 74 69 74 69 6f |rive or |partitio|
|000053c0| 6e 2e 20 20 4f 74 68 65 | 72 77 69 73 65 2c 20 74 |n. Othe|rwise, t|
|000053d0| 68 65 20 73 74 61 74 65 | 20 6f 66 20 61 20 74 72 |he state| of a tr|
|000053e0| 61 6e 73 61 63 74 69 6f | 6e 20 74 6f 20 6f 6e 65 |ansactio|n to one|
|000053f0| 20 64 72 69 76 65 20 6d | 61 79 20 62 65 20 6c 6f | drive m|ay be lo|
|00005400| 73 74 20 77 68 65 6e 20 | 74 68 65 20 64 72 69 76 |st when |the driv|
|00005410| 65 72 20 69 73 20 72 65 | 65 6e 74 65 72 65 64 20 |er is re|entered |
|00005420| 74 6f 20 73 65 72 76 69 | 63 65 20 61 6e 6f 74 68 |to servi|ce anoth|
|00005430| 65 72 20 64 72 69 76 65 | 2e 20 20 54 68 65 72 65 |er drive|. There|
|00005440| 20 69 73 20 6e 6f 20 70 | 72 6f 62 6c 65 6d 20 77 | is no p|roblem w|
|00005450| 69 74 68 20 72 65 65 6e | 74 72 61 6e 63 79 20 66 |ith reen|trancy f|
|00005460| 6f 72 20 64 72 69 76 65 | 72 73 20 77 68 69 63 68 |or drive|rs which|
|00005470| 20 63 6f 6e 74 72 6f 6c | 20 6f 6e 6c 79 20 61 20 | control| only a |
|00005480| 73 69 6e 67 6c 65 20 64 | 72 69 76 65 20 6f 72 20 |single d|rive or |
|00005490| 70 61 72 74 69 74 69 6f | 6e 2e 0d 49 6e 20 6d 61 |partitio|n..In ma|
|000054a0| 6e 79 20 63 61 73 65 73 | 20 6f 66 20 53 43 53 49 |ny cases| of SCSI|
|000054b0| 20 63 6f 64 65 20 69 6e | 63 6f 6d 70 61 74 69 62 | code in|compatib|
|000054c0| 69 6c 69 74 79 2c 20 72 | 65 65 6e 74 72 61 6e 63 |ility, r|eentranc|
|000054d0| 79 20 69 73 20 6e 6f 74 | 20 74 68 65 20 70 72 6f |y is not| the pro|
|000054e0| 62 6c 65 6d 2e 20 20 54 | 68 69 73 20 61 66 66 65 |blem. T|his affe|
|000054f0| 63 74 73 20 6f 6e 6c 79 | 20 74 68 65 20 73 6d 61 |cts only| the sma|
|00005500| 6c 6c 20 6e 75 6d 62 65 | 72 20 6f 66 20 53 43 53 |ll numbe|r of SCS|
|00005510| 49 20 64 69 73 6b 20 64 | 72 69 76 65 72 73 20 77 |I disk d|rivers w|
|00005520| 68 69 63 68 20 61 72 65 | 20 64 65 73 69 67 6e 65 |hich are| designe|
|00005530| 64 20 74 6f 20 63 6f 6e | 74 72 6f 6c 20 6d 75 6c |d to con|trol mul|
|00005540| 74 69 70 6c 65 20 64 72 | 69 76 65 73 20 6f 72 20 |tiple dr|ives or |
|00005550| 70 61 72 74 69 74 69 6f | 6e 73 20 66 72 6f 6d 20 |partitio|ns from |
|00005560| 61 20 73 69 6e 67 6c 65 | 20 64 72 69 76 65 72 2e |a single| driver.|
|00005570| 20 20 41 20 6d 6f 72 65 | 20 63 6f 6d 6d 6f 6e 20 | A more| common |
|00005580| 70 72 6f 62 6c 65 6d 20 | 69 73 20 63 61 75 73 65 |problem |is cause|
|00005590| 64 20 62 79 20 61 20 70 | 61 67 65 20 66 61 75 6c |d by a p|age faul|
|000055a0| 74 20 77 68 69 6c 65 20 | 74 68 65 20 53 43 53 49 |t while |the SCSI|
|000055b0| 20 62 75 73 20 69 73 20 | 62 75 73 79 2e 20 20 53 | bus is |busy. S|
|000055c0| 69 6e 63 65 20 56 4d 20 | 64 65 70 65 6e 64 73 20 |ince VM |depends |
|000055d0| 6f 6e 20 74 68 65 20 53 | 43 53 49 20 62 75 73 20 |on the S|CSI bus |
|000055e0| 74 6f 20 68 61 6e 64 6c | 65 20 61 20 70 61 67 65 |to handl|e a page|
|000055f0| 20 66 61 75 6c 74 2c 20 | 61 20 70 61 67 65 20 66 | fault, |a page f|
|00005600| 61 75 6c 74 20 69 73 20 | 66 6f 72 62 69 64 64 65 |ault is |forbidde|
|00005610| 6e 20 74 6f 20 68 61 70 | 70 65 6e 20 77 68 69 6c |n to hap|pen whil|
|00005620| 65 20 74 68 65 20 53 43 | 53 49 20 62 75 73 20 69 |e the SC|SI bus i|
|00005630| 73 20 62 75 73 79 2e 20 | 43 6f 64 65 20 77 68 69 |s busy. |Code whi|
|00005640| 63 68 20 75 73 65 73 20 | 74 68 65 20 53 43 53 49 |ch uses |the SCSI|
|00005650| 20 4d 61 6e 61 67 65 72 | 20 6e 65 65 64 73 20 69 | Manager| needs i|
|00005660| 6e 20 67 65 6e 65 72 61 | 6c 20 74 6f 20 65 6e 73 |n genera|l to ens|
|00005670| 75 72 65 20 74 68 61 74 | 20 61 6c 6c 20 69 74 73 |ure that| all its|
|00005680| 20 63 6f 64 65 2c 20 62 | 75 66 66 65 72 73 2c 20 | code, b|uffers, |
|00005690| 61 6e 64 20 64 61 74 61 | 20 73 74 72 75 63 74 75 |and data| structu|
|000056a0| 72 65 73 20 28 69 6e 63 | 6c 75 64 69 6e 67 20 54 |res (inc|luding T|
|000056b0| 49 42 73 29 20 61 72 65 | 20 68 65 6c 64 20 69 6e |IBs) are| held in|
|000056c0| 20 72 65 61 6c 20 6d 65 | 6d 6f 72 79 20 62 65 66 | real me|mory bef|
|000056d0| 6f 72 65 20 74 61 6b 69 | 6e 67 20 63 6f 6e 74 72 |ore taki|ng contr|
|000056e0| 6f 6c 20 6f 66 20 74 68 | 65 20 62 75 73 2e 0d 49 |ol of th|e bus..I|
|000056f0| 6e 20 74 68 65 20 6e 6f | 72 6d 61 6c 20 63 6f 75 |n the no|rmal cou|
|00005700| 72 73 65 20 6f 66 20 65 | 76 65 6e 74 73 2c 20 74 |rse of e|vents, t|
|00005710| 68 65 20 73 79 73 74 65 | 6d 20 68 65 61 70 20 69 |he syste|m heap i|
|00005720| 73 20 68 65 6c 64 20 69 | 6e 20 72 65 61 6c 20 6d |s held i|n real m|
|00005730| 65 6d 6f 72 79 2e 20 4f | 74 68 65 72 20 63 72 69 |emory. O|ther cri|
|00005740| 74 69 63 61 6c 20 73 74 | 72 75 63 74 75 72 65 73 |tical st|ructures|
|00005750| 20 61 72 65 20 68 65 6c | 64 20 66 6f 72 20 79 6f | are hel|d for yo|
|00005760| 75 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 2c |u automa|tically,|
|00005770| 20 6c 69 6b 65 20 61 6e | 79 20 72 61 6e 67 65 20 | like an|y range |
|00005780| 6f 66 20 6d 65 6d 6f 72 | 79 20 70 61 73 73 65 64 |of memor|y passed|
|00005790| 20 74 6f 20 61 20 44 65 | 76 69 63 65 20 4d 61 6e | to a De|vice Man|
|000057a0| 61 67 65 72 20 5f 52 65 | 61 64 20 6f 72 20 5f 57 |ager _Re|ad or _W|
|000057b0| 72 69 74 65 20 63 61 6c | 6c 20 69 6e 20 69 6f 42 |rite cal|l in ioB|
|000057c0| 75 66 66 65 72 20 61 6e | 64 20 69 6f 52 65 71 43 |uffer an|d ioReqC|
|000057d0| 6f 75 6e 74 2e 20 53 6f | 20 69 66 20 79 6f 75 72 |ount. So| if your|
|000057e0| 20 53 43 53 49 20 63 6f | 64 65 20 69 73 20 77 72 | SCSI co|de is wr|
|000057f0| 69 74 74 65 6e 20 61 73 | 20 61 20 64 65 76 69 63 |itten as| a devic|
|00005800| 65 20 64 72 69 76 65 72 | 2c 20 61 6e 64 20 74 68 |e driver|, and th|
|00005810| 65 20 62 75 66 66 65 72 | d5 73 20 61 64 64 72 65 |e buffer|.s addre|
|00005820| 73 73 20 61 6e 64 20 6c | 65 6e 67 74 68 20 61 72 |ss and l|ength ar|
|00005830| 65 20 70 61 73 73 65 64 | 20 69 6e 20 74 68 65 20 |e passed| in the |
|00005840| 6e 6f 72 6d 61 6c 20 64 | 72 69 76 65 72 20 66 61 |normal d|river fa|
|00005850| 73 68 69 6f 6e 2c 20 61 | 6e 64 20 69 66 20 79 6f |shion, a|nd if yo|
|00005860| 75 72 20 64 72 69 76 65 | 72 20 63 6f 64 65 20 61 |ur drive|r code a|
|00005870| 6e 64 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |nd data |structur|
|00005880| 65 73 20 61 72 65 20 6c | 6f 63 61 74 65 64 20 69 |es are l|ocated i|
|00005890| 6e 20 74 68 65 20 73 79 | 73 74 65 6d 20 68 65 61 |n the sy|stem hea|
|000058a0| 70 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 62 65 |p, you s|hould be|
|000058b0| 20 66 75 6c 6c 79 20 56 | 4d 2d 63 6f 6d 70 61 74 | fully V|M-compat|
|000058c0| 69 62 6c 65 20 61 6c 72 | 65 61 64 79 20 28 61 73 |ible alr|eady (as|
|000058d0| 20 6c 6f 6e 67 20 61 73 | 20 79 6f 75 20 6f 6e 6c | long as| you onl|
|000058e0| 79 20 6f 70 65 72 61 74 | 65 20 6f 6e 20 6f 6e 65 |y operat|e on one|
|000058f0| 20 64 72 69 76 65 20 70 | 65 72 20 64 72 69 76 65 | drive p|er drive|
|00005900| 72 29 2e 0d 49 66 20 79 | 6f 75 72 20 53 43 53 49 |r)..If y|our SCSI|
|00005910| 20 63 6f 64 65 20 69 73 | 20 6e 6f 74 20 61 20 73 | code is| not a s|
|00005920| 74 61 6e 64 61 72 64 20 | 44 65 76 69 63 65 20 4d |tandard |Device M|
|00005930| 61 6e 61 67 65 72 20 64 | 72 69 76 65 72 20 6f 72 |anager d|river or|
|00005940| 20 69 66 20 79 6f 75 20 | 72 65 66 65 72 65 6e 63 | if you |referenc|
|00005950| 65 20 62 75 66 66 65 72 | 73 20 61 73 20 63 73 50 |e buffer|s as csP|
|00005960| 61 72 61 6d 73 20 74 6f | 20 5f 43 6f 6e 74 72 6f |arams to| _Contro|
|00005970| 6c 20 6f 72 20 5f 53 74 | 61 74 75 73 20 63 61 6c |l or _St|atus cal|
|00005980| 6c 73 2c 20 79 6f 75 27 | 6c 6c 20 6e 65 65 64 20 |ls, you'|ll need |
|00005990| 74 6f 20 64 6f 20 73 6f | 6d 65 20 65 78 74 72 61 |to do so|me extra|
|000059a0| 20 77 6f 72 6b 2e 20 41 | 6c 73 6f 2c 20 41 70 70 | work. A|lso, App|
|000059b0| 6c 65 20 64 6f 65 73 20 | 6e 6f 74 20 67 75 61 72 |le does |not guar|
|000059c0| 61 6e 74 65 65 20 74 68 | 61 74 20 74 68 65 20 73 |antee th|at the s|
|000059d0| 79 73 74 65 6d 20 68 65 | 61 70 20 77 69 6c 6c 20 |ystem he|ap will |
|000059e0| 61 6c 77 61 79 73 20 62 | 65 20 68 65 6c 64 20 66 |always b|e held f|
|000059f0| 6f 72 20 65 76 65 72 20 | 61 6e 64 20 65 76 65 72 |or ever |and ever|
|00005a00| 2c 20 73 6f 20 69 66 20 | 79 6f 75 20 63 6f 6d 65 |, so if |you come|
|00005a10| 20 74 6f 20 72 65 76 69 | 73 65 20 79 6f 75 72 20 | to revi|se your |
|00005a20| 64 72 69 76 65 72 20 79 | 6f 75 20 73 68 6f 75 6c |driver y|ou shoul|
|00005a30| 64 20 73 65 72 69 6f 75 | 73 6c 79 20 63 6f 6e 73 |d seriou|sly cons|
|00005a40| 69 64 65 72 20 68 6f 6c | 64 69 6e 67 20 65 78 70 |ider hol|ding exp|
|00005a50| 6c 69 63 69 74 6c 79 20 | 65 76 65 72 79 74 68 69 |licitly |everythi|
|00005a60| 6e 67 20 79 6f 75 20 74 | 6f 75 63 68 20 77 68 69 |ng you t|ouch whi|
|00005a70| 6c 65 20 79 6f 75 20 6f | 77 6e 20 74 68 65 20 53 |le you o|wn the S|
|00005a80| 43 53 49 20 62 75 73 20 | 61 6e 64 20 65 76 65 72 |CSI bus |and ever|
|00005a90| 79 74 68 69 6e 67 20 79 | 6f 75 20 6d 69 67 68 74 |ything y|ou might|
|00005aa0| 20 6b 6e 6f 77 69 6e 67 | 6c 79 20 74 6f 75 63 68 | knowing|ly touch|
|00005ab0| 20 61 74 20 69 6e 74 65 | 72 72 75 70 74 20 74 69 | at inte|rrupt ti|
|00005ac0| 6d 65 3b 20 61 6e 64 20 | 6f 66 20 63 6f 75 72 73 |me; and |of cours|
|00005ad0| 65 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 63 6f 72 |e you sh|ould cor|
|00005ae0| 72 65 73 70 6f 6e 64 69 | 6e 67 6c 79 20 75 6e 68 |respondi|ngly unh|
|00005af0| 6f 6c 64 20 61 6c 6c 20 | 74 68 65 73 65 20 73 74 |old all |these st|
|00005b00| 72 75 63 74 75 72 65 73 | 20 75 70 6f 6e 20 72 65 |ructures| upon re|
|00005b10| 6c 65 61 73 69 6e 67 20 | 74 68 65 20 62 75 73 2e |leasing |the bus.|
|00005b20| 20 20 42 65 20 61 20 67 | 6f 6f 64 20 63 69 74 69 | Be a g|ood citi|
|00005b30| 7a 65 6e 2e 0d 49 6e 20 | 61 64 64 69 74 69 6f 6e |zen..In |addition|
|00005b40| 20 74 6f 20 74 68 65 20 | 72 65 71 75 69 72 65 6d | to the |requirem|
|00005b50| 65 6e 74 20 66 6f 72 20 | 72 65 65 6e 74 72 61 6e |ent for |reentran|
|00005b60| 63 79 20 61 63 72 6f 73 | 73 20 64 72 69 76 65 73 |cy acros|s drives|
|00005b70| 20 73 65 72 76 65 64 20 | 62 79 20 61 20 73 69 6e | served |by a sin|
|00005b80| 67 6c 65 20 64 72 69 76 | 65 72 2c 20 74 68 65 20 |gle driv|er, the |
|00005b90| 64 72 69 76 65 72 20 66 | 6f 72 20 61 20 64 69 73 |driver f|or a dis|
|00005ba0| 6b 20 75 73 65 64 20 61 | 73 20 61 20 62 61 63 6b |k used a|s a back|
|00005bb0| 69 6e 67 20 73 74 6f 72 | 65 20 6d 75 73 74 20 6c |ing stor|e must l|
|00005bc0| 6f 61 64 20 61 74 20 74 | 68 65 20 65 61 72 6c 69 |oad at t|he earli|
|00005bd0| 65 73 74 20 70 6f 73 73 | 69 62 6c 65 20 6f 70 70 |est poss|ible opp|
|00005be0| 6f 72 74 75 6e 69 74 79 | 2e 20 20 44 72 69 76 65 |ortunity|. Drive|
|00005bf0| 72 73 20 77 68 69 63 68 | 20 64 65 66 65 72 20 69 |rs which| defer i|
|00005c00| 6e 73 74 61 6c 6c 61 74 | 69 6f 6e 20 75 6e 74 69 |nstallat|ion unti|
|00005c10| 6c 20 49 4e 49 54 20 74 | 69 6d 65 20 61 72 65 20 |l INIT t|ime are |
|00005c20| 74 6f 6f 20 6c 61 74 65 | 20 74 6f 20 62 65 20 75 |too late| to be u|
|00005c30| 73 65 64 20 62 79 20 56 | 4d 2e 0d 43 6f 6d 70 61 |sed by V|M..Compa|
|00005c40| 74 69 62 69 6c 69 74 79 | 20 57 69 74 68 20 4f 74 |tibility| With Ot|
|00005c50| 68 65 72 20 44 65 76 69 | 63 65 20 44 72 69 76 65 |her Devi|ce Drive|
|00005c60| 72 73 20 61 6e 64 20 49 | 6e 74 65 72 72 75 70 74 |rs and I|nterrupt|
|00005c70| 2d 4c 65 76 65 6c 20 43 | 6f 64 65 0d 54 68 65 20 |-Level C|ode.The |
|00005c80| 70 72 69 6d 61 72 79 20 | 63 6f 6e 63 65 72 6e 20 |primary |concern |
|00005c90| 66 6f 72 20 64 65 76 69 | 63 65 20 64 72 69 76 65 |for devi|ce drive|
|00005ca0| 72 73 20 69 73 20 74 68 | 61 74 20 74 68 65 79 20 |rs is th|at they |
|00005cb0| 63 6f 6d 6d 6f 6e 6c 79 | 20 72 75 6e 20 61 74 20 |commonly| run at |
|00005cc0| 69 6e 74 65 72 72 75 70 | 74 20 74 69 6d 65 20 61 |interrup|t time a|
|00005cd0| 6e 64 20 69 74 20 69 73 | 20 61 62 73 6f 6c 75 74 |nd it is| absolut|
|00005ce0| 65 6c 79 20 65 73 73 65 | 6e 74 69 61 6c 20 74 68 |ely esse|ntial th|
|00005cf0| 61 74 20 69 6e 74 65 72 | 72 75 70 74 2d 6c 65 76 |at inter|rupt-lev|
|00005d00| 65 6c 20 63 6f 64 65 20 | 64 6f 65 73 20 6e 6f 74 |el code |does not|
|00005d10| 20 63 61 75 73 65 20 61 | 20 70 61 67 65 20 66 61 | cause a| page fa|
|00005d20| 75 6c 74 2e 20 20 54 6f | 20 61 76 6f 69 64 20 74 |ult. To| avoid t|
|00005d30| 68 69 73 2c 20 64 72 69 | 76 65 72 73 20 73 68 6f |his, dri|vers sho|
|00005d40| 75 6c 64 20 6d 61 6b 65 | 20 63 65 72 74 61 69 6e |uld make| certain|
|00005d50| 20 74 68 61 74 20 61 6e | 79 20 64 61 74 61 20 73 | that an|y data s|
|00005d60| 74 72 75 63 74 75 72 65 | 73 20 74 68 65 79 20 6b |tructure|s they k|
|00005d70| 65 65 70 20 6f 72 20 72 | 65 66 65 72 65 6e 63 65 |eep or r|eference|
|00005d80| 20 61 74 20 69 6e 74 65 | 72 72 75 70 74 20 74 69 | at inte|rrupt ti|
|00005d90| 6d 65 20 61 72 65 20 68 | 65 6c 64 20 69 6e 20 70 |me are h|eld in p|
|00005da0| 68 79 73 69 63 61 6c 20 | 6d 65 6d 6f 72 79 20 61 |hysical |memory a|
|00005db0| 73 20 64 65 73 63 72 69 | 62 65 64 20 65 61 72 6c |s descri|bed earl|
|00005dc0| 69 65 72 2e 20 20 4c 6f | 63 6b 69 6e 67 20 74 68 |ier. Lo|cking th|
|00005dd0| 65 20 73 74 72 75 63 74 | 75 72 65 73 20 69 73 20 |e struct|ures is |
|00005de0| 74 79 70 69 63 61 6c 6c | 79 20 6e 6f 74 20 6e 65 |typicall|y not ne|
|00005df0| 63 65 73 73 61 72 79 20 | 65 78 63 65 70 74 20 69 |cessary |except i|
|00005e00| 6e 20 63 61 73 65 73 20 | 77 68 65 72 65 20 61 6c |n cases |where al|
|00005e10| 74 65 72 6e 61 74 65 20 | 62 75 73 20 6d 61 73 74 |ternate |bus mast|
|00005e20| 65 72 20 68 61 72 64 77 | 61 72 65 20 61 63 63 65 |er hardw|are acce|
|00005e30| 73 73 65 73 20 74 68 6f | 73 65 20 73 74 72 75 63 |sses tho|se struc|
|00005e40| 74 75 72 65 73 20 61 73 | 20 77 65 6c 6c 2e 0d 54 |tures as| well..T|
|00005e50| 6f 20 69 6d 70 72 6f 76 | 65 20 70 65 72 66 6f 72 |o improv|e perfor|
|00005e60| 6d 61 6e 63 65 20 61 6e | 64 20 63 6f 6d 70 61 74 |mance an|d compat|
|00005e70| 69 62 69 6c 69 74 79 20 | 77 69 74 68 20 65 78 69 |ibility |with exi|
|00005e80| 73 74 69 6e 67 20 73 6f | 66 74 77 61 72 65 20 61 |sting so|ftware a|
|00005e90| 6e 64 20 64 72 69 76 65 | 72 73 2c 20 74 68 65 20 |nd drive|rs, the |
|00005ea0| 66 69 72 73 74 20 72 65 | 6c 65 61 73 65 20 6f 66 |first re|lease of|
|00005eb0| 20 53 79 73 74 65 6d 20 | 53 6f 66 74 77 61 72 65 | System |Software|
|00005ec0| 20 37 2e 30 20 61 6c 77 | 61 79 73 20 68 6f 6c 64 | 7.0 alw|ays hold|
|00005ed0| 73 20 74 68 65 20 65 6e | 74 69 72 65 20 73 79 73 |s the en|tire sys|
|00005ee0| 74 65 6d 20 68 65 61 70 | 20 69 6e 20 70 68 79 73 |tem heap| in phys|
|00005ef0| 69 63 61 6c 20 6d 65 6d | 6f 72 79 2e 20 20 4e 6f |ical mem|ory. No|
|00005f00| 20 73 70 65 63 69 61 6c | 20 6d 65 61 73 75 72 65 | special| measure|
|00005f10| 73 20 6e 65 65 64 20 62 | 65 20 74 61 6b 65 6e 20 |s need b|e taken |
|00005f20| 69 66 20 79 6f 75 72 20 | 64 72 69 76 65 72 20 61 |if your |driver a|
|00005f30| 6e 64 20 69 74 73 20 61 | 73 73 6f 63 69 61 74 65 |nd its a|ssociate|
|00005f40| 64 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |d data s|tructure|
|00005f50| 73 20 61 72 65 20 61 6c | 6c 20 69 6e 73 74 61 6c |s are al|l instal|
|00005f60| 6c 65 64 20 69 6e 20 74 | 68 65 20 73 79 73 74 65 |led in t|he syste|
|00005f70| 6d 20 68 65 61 70 2e 20 | 20 49 66 20 79 6f 75 72 |m heap. | If your|
|00005f80| 20 64 72 69 76 65 72 20 | 75 73 65 73 20 6d 65 6d | driver |uses mem|
|00005f90| 6f 72 79 20 73 74 61 74 | 69 63 61 6c 6c 79 20 61 |ory stat|ically a|
|00005fa0| 6c 6c 6f 63 61 74 65 64 | 20 61 62 6f 76 65 20 42 |llocated| above B|
|00005fb0| 75 66 50 74 72 2c 20 69 | 74 20 6d 61 79 20 6e 65 |ufPtr, i|t may ne|
|00005fc0| 65 64 20 74 6f 20 65 78 | 70 6c 69 63 69 74 6c 79 |ed to ex|plicitly|
|00005fd0| 20 68 6f 6c 64 20 74 68 | 65 20 61 70 70 72 6f 70 | hold th|e approp|
|00005fe0| 72 69 61 74 65 20 72 61 | 6e 67 65 73 20 6f 66 20 |riate ra|nges of |
|00005ff0| 6d 65 6d 6f 72 79 20 74 | 6f 20 61 76 6f 69 64 20 |memory t|o avoid |
|00006000| 70 61 67 69 6e 67 20 61 | 74 20 69 6e 74 65 72 72 |paging a|t interr|
|00006010| 75 70 74 20 74 69 6d 65 | 2e 20 20 50 6c 65 61 73 |upt time|. Pleas|
|00006020| 65 20 62 65 20 61 77 61 | 72 65 20 74 68 61 74 20 |e be awa|re that |
|00006030| 66 75 74 75 72 65 20 76 | 65 72 73 69 6f 6e 73 20 |future v|ersions |
|00006040| 6f 66 20 74 68 65 20 4d | 61 63 69 6e 74 6f 73 68 |of the M|acintosh|
|00006050| 20 53 79 73 74 65 6d 20 | 53 6f 66 74 77 61 72 65 | System |Software|
|00006060| 20 6d 61 79 20 6e 6f 74 | 20 68 6f 6c 64 20 61 6c | may not| hold al|
|00006070| 6c 20 6f 66 20 74 68 65 | 20 73 79 73 74 65 6d 20 |l of the| system |
|00006080| 68 65 61 70 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |heap aut|omatical|
|00006090| 6c 79 20 61 6e 64 20 69 | 74 20 69 73 20 61 20 67 |ly and i|t is a g|
|000060a0| 6f 6f 64 20 68 61 62 69 | 74 20 74 6f 20 68 6f 6c |ood habi|t to hol|
|000060b0| 64 20 65 78 70 6c 69 63 | 69 74 6c 79 20 6d 65 6d |d explic|itly mem|
|000060c0| 6f 72 79 20 79 6f 75 20 | 6b 6e 6f 77 20 79 6f 75 |ory you |know you|
|000060d0| 20 61 63 63 65 73 73 20 | 61 74 20 69 6e 74 65 72 | access |at inter|
|000060e0| 72 75 70 74 20 74 69 6d | 65 2e 0d 54 68 65 20 44 |rupt tim|e..The D|
|000060f0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 64 65 |evice Ma|nager de|
|00006100| 61 6c 73 20 77 69 74 68 | 20 5f 52 65 61 64 20 61 |als with| _Read a|
|00006110| 6e 64 20 5f 57 72 69 74 | 65 20 63 61 6c 6c 73 20 |nd _Writ|e calls |
|00006120| 66 6f 72 20 79 6f 75 2c | 20 61 6e 64 20 65 6e 73 |for you,| and ens|
|00006130| 75 72 65 73 20 74 68 61 | 74 20 74 68 65 20 62 75 |ures tha|t the bu|
|00006140| 66 66 65 72 73 20 73 70 | 65 63 69 66 69 65 64 20 |ffers sp|ecified |
|00006150| 66 6f 72 20 73 75 63 68 | 20 63 61 6c 6c 73 20 61 |for such| calls a|
|00006160| 72 65 20 73 61 66 65 2e | 20 20 48 6f 77 65 76 65 |re safe.| Howeve|
|00006170| 72 2c 20 69 66 20 61 20 | 62 75 66 66 65 72 20 69 |r, if a |buffer i|
|00006180| 73 20 70 61 73 73 65 64 | 20 61 73 20 61 20 63 73 |s passed| as a cs|
|00006190| 50 61 72 61 6d 20 74 6f | 20 5f 53 74 61 74 75 73 |Param to| _Status|
|000061a0| 20 6f 72 20 5f 43 6f 6e | 74 72 6f 6c 20 63 61 6c | or _Con|trol cal|
|000061b0| 6c 73 2c 20 74 68 65 20 | 44 65 76 69 63 65 20 4d |ls, the |Device M|
|000061c0| 61 6e 61 67 65 72 20 63 | 61 6e 6e 6f 74 20 64 6f |anager c|annot do|
|000061d0| 20 61 6e 79 74 68 69 6e | 67 20 61 62 6f 75 74 20 | anythin|g about |
|000061e0| 69 74 2e 20 20 42 75 66 | 66 65 72 73 20 72 65 66 |it. Buf|fers ref|
|000061f0| 65 72 65 6e 63 65 64 20 | 74 68 69 73 20 77 61 79 |erenced |this way|
|00006200| 20 6d 75 73 74 20 62 65 | 20 68 65 6c 64 20 65 78 | must be| held ex|
|00006210| 70 6c 69 63 69 74 6c 79 | 20 69 66 20 74 68 65 79 |plicitly| if they|
|00006220| 20 61 72 65 20 74 6f 20 | 62 65 20 61 63 63 65 73 | are to |be acces|
|00006230| 73 65 64 20 62 79 20 69 | 6e 74 65 72 72 75 70 74 |sed by i|nterrupt|
|00006240| 2d 6c 65 76 65 6c 20 63 | 6f 64 65 2e 0d 43 65 72 |-level c|ode..Cer|
|00006250| 74 61 69 6e 20 63 6f 64 | 65 20 74 79 70 65 73 20 |tain cod|e types |
|00006260| 61 72 65 20 61 6c 77 61 | 79 73 20 64 65 66 65 72 |are alwa|ys defer|
|00006270| 72 65 64 20 75 6e 74 69 | 6c 20 74 69 6d 65 73 20 |red unti|l times |
|00006280| 77 68 65 6e 20 70 61 67 | 69 6e 67 20 69 73 20 73 |when pag|ing is s|
|00006290| 61 66 65 2c 20 61 6e 64 | 20 61 73 20 73 75 63 68 |afe, and| as such|
|000062a0| 20 64 6f 6e d5 74 20 68 | 61 76 65 20 74 6f 20 62 | don.t h|ave to b|
|000062b0| 65 20 63 6f 6e 63 65 72 | 6e 65 64 20 61 62 6f 75 |e concer|ned abou|
|000062c0| 74 20 77 68 65 74 68 65 | 72 20 6d 65 6d 6f 72 79 |t whethe|r memory|
|000062d0| 20 74 68 65 79 20 74 6f | 75 63 68 20 69 73 20 67 | they to|uch is g|
|000062e0| 75 61 72 61 6e 74 65 65 | 64 20 74 6f 20 62 65 20 |uarantee|d to be |
|000062f0| 68 65 6c 64 2e 20 20 54 | 68 6f 73 65 20 63 6f 64 |held. T|hose cod|
|00006300| 65 20 74 79 70 65 73 20 | 69 6e 63 6c 75 64 65 20 |e types |include |
|00006310| 44 65 76 69 63 65 20 4d | 61 6e 61 67 65 72 20 49 |Device M|anager I|
|00006320| 2f 4f 20 63 6f 6d 70 6c | 65 74 69 6f 6e 20 72 6f |/O compl|etion ro|
|00006330| 75 74 69 6e 65 73 2c 20 | 54 69 6d 65 20 4d 61 6e |utines, |Time Man|
|00006340| 61 67 65 72 20 74 61 73 | 6b 73 2c 20 56 42 4c 20 |ager tas|ks, VBL |
|00006350| 74 61 73 6b 73 2c 20 61 | 6e 64 20 73 6c 6f 74 20 |tasks, a|nd slot |
|00006360| 56 42 4c 20 74 61 73 6b | 73 2e 20 20 54 68 65 20 |VBL task|s. The |
|00006370| 74 72 61 64 65 2d 6f 66 | 66 20 69 73 20 69 6e 20 |trade-of|f is in |
|00006380| 72 65 61 6c 2d 74 69 6d | 65 20 70 65 72 66 6f 72 |real-tim|e perfor|
|00006390| 6d 61 6e 63 65 2e 20 20 | 43 6c 65 61 72 6c 79 2c |mance. |Clearly,|
|000063a0| 20 73 69 6e 63 65 20 74 | 68 65 73 65 20 74 61 73 | since t|hese tas|
|000063b0| 6b 73 20 6d 61 79 20 62 | 65 20 64 65 66 65 72 72 |ks may b|e deferr|
|000063c0| 65 64 2c 20 74 68 65 72 | 65 20 69 73 20 61 6e 20 |ed, ther|e is an |
|000063d0| 69 6e 63 72 65 61 73 65 | 64 20 70 6f 73 73 69 62 |increase|d possib|
|000063e0| 69 6c 69 74 79 20 6f 66 | 20 6c 61 74 65 6e 63 79 |ility of| latency|
|000063f0| 20 77 68 69 63 68 20 6d | 61 79 20 62 65 20 75 6e | which m|ay be un|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.